UNPKG

data-structure-typed

Version:
15 lines (12 loc) 323 B
export type Direction = 'up' | 'right' | 'down' | 'left'; export type Turning = { [key in Direction]: Direction }; export type NavigatorParams<T = any> = { matrix: T[][]; turning: Turning; onMove: (cur: [number, number]) => void; init: { cur: [number, number]; charDir: Direction; VISITED: T; }; };