3 Matching Annotations
- Nov 2021
-
github.com github.com
-
export interface TasksListSpecifics { 0: ('parallel' | 'sequential'); } export type TasksList = (string[] & TasksListSpecifics); Or more compact: export type TasksList = (string[] & { 0: ('parallel' | 'sequential'); }); The trick is to add your more specific properties on top of array of string type (Array<string>).
-
-
www.typescriptlang.org www.typescriptlang.org
-
Animal & { honey: boolean }
-
Extending a type via intersections
-