ts array interface code example
Example 1: typescript export interface array
interface Animal { name: string; size: "small"; medium; large;}const animalsArray: Animal[] = [ { name: "chicken", size: "small" }, { name: "pig", size: "medium" }, { name: "cow", size: "large" },];
Example 2: create method in interface for set TS
running: someTask, arg: test