We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bee693 commit b80793dCopy full SHA for b80793d
tests/src/es5.ts
@@ -437,6 +437,26 @@ expectType<{ foo: number; bar: string; baz: boolean }>(
437
expectType<[2, 2, 2]>(a2);
438
}
439
expectType<[string, string, string]>(a2.map(() => "foo"));
440
+
441
+ // https://github.com/uhyo/better-typescript-lib/issues/35
442
+ function template(strings: TemplateStringsArray, ...keys: string[]): string {
443
+ const mapped = strings.map((v) => v);
444
+ expectType<number>(mapped.length);
445
+ }
446
+ {
447
+ class ArrX extends Array<number> {
448
+ constructor(nums: number[]) {
449
+ super(...nums);
450
451
452
+ sum(): number {
453
+ return this.reduce((s, n) => s + n, 0);
454
455
456
+ const arrX = new ArrX([2, 3, 4]);
457
+ const mapped = arrX.map((v) => String(v));
458
459
460
461
462
// ArrayConstructor
0 commit comments