yysun / apprun

AppRun is a JavaScript library for developing high-performance and reliable web applications using the elm inspired architecture, events and components.

Home Page:https://apprun.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Definition file fails to coompile with strict settings.

MicahZoltu opened this issue · comments

  1. npm install apprun
  2. Set "noImplicitAny": true compiler flag.
  3. Add import app from 'apprun' to a TypeScript file.
  4. Try to compile the project.
  5. --> Notice that you get the following errors:
Error /path/to/project/node_modules/apprun/apprun.d.ts 10, 351: Parameter 'props' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 16, 221: Member 'history' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 17, 161: Parameter 'state' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 22, 181: Member 'history' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 27, 421: Parameter 'props' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 27, 501: Rest parameter 'children' implicitly has an 'any[]' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 29, 131: Parameter 'props' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 29, 201: Rest parameter 'children' implicitly has an 'any[]' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 37, 591: Member 'history' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 38, 591: Member 'history' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 41, 251: Parameter 'props' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 42, 261: Parameter 'children' implicitly has an 'any' type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 50, 181: 'on', which lacks return-type annotation, implicitly has an 'any' return type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 52, 181: 'update', which lacks return-type annotation, implicitly has an 'any' return type.
Error /path/to/project/node_modules/apprun/apprun.d.ts 53, 181: 'event', which lacks return-type annotation, implicitly has an 'any' return type.

Failures in apprun.d.ts is fixed in 1.21.8/2.21.8, but noImplicitAny is still not supported. As you mentioned in #70, there are JSX related errors.