type Point = { [key: string]: number};function processPoints(points: Point[]): string[] { // Should error on Object.keys(number), TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. // Should warn on points[3] possibly being undefined return Object.keys(points[3].foo);}console.log(processPoints([ { bar: 2 } ]));
type Point = { [key: string]: number};function processPoints(points: Point[]): string[] { // Should error on Object.keys(number), TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. // Should warn on points[3] possibly being undefined return Object.keys(points[3].foo);}console.log(processPoints([ { bar: 2 } ]));
I've run
deno lint --rules-tags=recommended
deno lint --rules-tags=recommended
but it doesn't detect anything. This is quite worrying. PS: should there be a
Lint
Lint
tag when posting here, now that we have lint plugins?