indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
525 stars 226 forks source link

Build of master generates many ts errors #306

Open kfowler-embue opened 3 years ago

kfowler-embue commented 3 years ago

Forked this repo to add ability to format hours in day view differently in different pickers within same app (i.e., could not use provider). Attempted to build first without any changes:

$ npm install $ npm run build

This generates many typescript errors. I've tried with several node versions, but it is pretty consistent. Is there some setting or environment issue I am missing that will resolve these errors? My expectation is that the latest code version on master should build

$ npm run build

> angular-moment-picker@0.10.2 build /home/kfowler/Development/angular-moment-picker
> webpack

ts-loader: Using typescript@2.9.2 and /home/kfowler/Development/angular-moment-picker/tsconfig.json
Hash: 887d434cd4c6ec8b9b90
Version: webpack 2.7.0
Time: 4061ms
                    Asset       Size  Chunks             Chunk Names
 angular-moment-picker.js    54.2 kB       0  [emitted]  main
angular-moment-picker.css    4.74 kB       0  [emitted]  main
   themes/material-ui.css    1.39 kB       0  [emitted]  main
            ../bower.json  722 bytes          [emitted]  
          ../package.json    1.82 kB          [emitted]  
   [0] ./src/utility.ts 2.82 kB {0} [built] [4 errors]
   [3] ./src/index.less 41 bytes {0} [built]
   [4] ./src/themes/material-ui.less 41 bytes {0} [built]
   [5] ./src/index.ts 702 bytes {0} [built] [1 error]
   [6] ./src/template.tpl.html 1.14 kB {0} [built]
   [7] ./src/directive.ts 27.6 kB {0} [built] [1 error]
   [8] ./src/helpers.ts 952 bytes {0} [built]
   [9] ./src/provider.ts 1.44 kB {0} [built]
  [11] ./src/views/decadeView.ts 1.83 kB {0} [built]
  [12] ./src/views/hourView.ts 3.37 kB {0} [built]
  [13] ./src/views/index.ts 549 bytes {0} [built]
  [14] ./src/views/minuteView.ts 3.31 kB {0} [built]
  [15] ./src/views/monthView.ts 2.55 kB {0} [built]
  [17] multi ./src/index.ts ./src/index.less ./src/themes/material-ui.less 52 bytes {0} [built]
  [18] ./~/css-loader/lib/css-base.js 2.26 kB [built]
    + 4 hidden modules

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(534,14): error TS2304: Cannot find name 'MapConstructor'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(543,14): error TS2304: Cannot find name 'SetConstructor'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(553,18): error TS2304: Cannot find name 'WeakMapConstructor'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(554,18): error TS2304: Cannot find name 'WeakSetConstructor'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(640,16): error TS2304: Cannot find name 'IterableIterator'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(642,13): error TS2304: Cannot find name 'IterableIterator'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(643,15): error TS2304: Cannot find name 'IterableIterator'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(1975,45): error TS2304: Cannot find name 'Iterable'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(1976,121): error TS2304: Cannot find name 'Iterable'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(1979,20): error TS2304: Cannot find name 'Iterator'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(1984,17): error TS2304: Cannot find name 'Iterator'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(1988,19): error TS2304: Cannot find name 'Iterator'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(1989,10): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/base.d.ts
(1989,30): error TS2304: Cannot find name 'Iterator'.

ERROR in /home/kfowler/Development/angular-moment-picker/node_modules/@types/node/index.d.ts
(20,1): error TS1084: Invalid 'reference' directive syntax.

ERROR in /home/kfowler/Development/angular-moment-picker/tests/properties/validate.ts
(20,51): error TS2551: Property 'appendTo' does not exist on type 'JQLite'. Did you mean 'append'?

ERROR in /home/kfowler/Development/angular-moment-picker/tests/properties/keyboard.ts
(23,23): error TS2304: Cannot find name '$'.

ERROR in /home/kfowler/Development/angular-moment-picker/tests/properties/keyboard.ts
(68,47): error TS2339: Property 'is' does not exist on type 'IAugmentedJQuery'.

ERROR in /home/kfowler/Development/angular-moment-picker/tests/properties/isOpen.ts
(17,80): error TS2339: Property 'is' does not exist on type 'IAugmentedJQuery'.

ERROR in /home/kfowler/Development/angular-moment-picker/tests/utility.ts
(38,34): error TS2322: Type 'string' is not assignable to type 'number'.

ERROR in /home/kfowler/Development/angular-moment-picker/tests/utility.ts
(40,26): error TS2339: Property 'replace' does not exist on type 'number'.

ERROR in /home/kfowler/Development/angular-moment-picker/tests/utility.ts
(65,27): error TS2339: Property 'trigger' does not exist on type 'JQLite'.

ERROR in /home/kfowler/Development/angular-moment-picker/tests/openClosePicker.ts
(19,80): error TS2339: Property 'is' does not exist on type 'IAugmentedJQuery'.

ERROR in ./src/utility.ts
(38,16): error TS2538: Type 'void' cannot be used as an index type.

ERROR in ./src/utility.ts
(38,40): error TS2538: Type 'void' cannot be used as an index type.

ERROR in ./src/utility.ts
(64,11): error TS2538: Type 'void' cannot be used as an index type.

ERROR in ./src/utility.ts
(64,28): error TS2538: Type 'void' cannot be used as an index type.

ERROR in ./src/index.ts
(12,56): error TS2559: Type 'Provider' has no properties in common with type 'IProviderOptions'.

ERROR in ./src/directive.ts
(200,67): error TS2339: Property 'replace' does not exist on type 'StartOf'.
  Property 'replace' does not exist on type 'void'.