人不仅为自己而生,而且也为祖国活着。——柏拉图

题目:

1
2
3
4
5
6
// This enables module augmentation mode.
import 'date-wizard';

declare module 'date-wizard' {
// Add your module extensions here.
}

报错:

1
2
3
4
5
index.ts(79,30): error TS2339: Property 'pad' does not exist on type 'typeof import("/node_modules/date-wizard/index.d.ts")'.
index.ts(101,67): error TS2339: Property 'hours' does not exist on type 'DateDetails'.
test.ts(5,5): error TS2344: Type 'false' does not satisfy the constraint 'true'.
test.ts(19,5): error TS2344: Type 'false' does not satisfy the constraint 'true'.
test.ts(20,27): error TS2339: Property 'pad' does not exist on type 'typeof import("/node_modules/date-wizard/index.d.ts")'.

答案:

1