nulab / backlog-js

Backlog API version 2 client for browser and node.
https://developer.nulab-inc.com/docs/backlog/
33 stars 13 forks source link

Compile error occurred when using noImplicitAny #46

Closed ohyama closed 2 years ago

ohyama commented 2 years ago

I tried backlog-js in my Angular project and I got some compile errors.

Error: node_modules/backlog-js/dist/backlog.d.ts:178:5 - error TS7010: 'postWatchingListItem', which lacks return-type annotation, implicitly has an 'any' return type.

178     postWatchingListItem(params: any);
        ~~~~~~~~~~~~~~~~~~~~

Error: node_modules/backlog-js/dist/backlog.d.ts:180:5 - error TS7010: 'deletehWatchingListItem', which lacks return-type annotation, implicitly has an 'any' return type.

180     deletehWatchingListItem(watchId: number);
        ~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/backlog-js/dist/backlog.d.ts:183:5 - error TS7010: 'getProjectGroupList', which lacks return-type annotation, implicitly has an 'any' return type.

183     getProjectGroupList(projectIdOrKey: string | number);
        ~~~~~~~~~~~~~~~~~~~

Error: node_modules/backlog-js/dist/backlog.d.ts:185:5 - error TS7010: 'postProjectGroup', which lacks return-type annotation, implicitly has an 'any' return type.

185     postProjectGroup(projectIdOrKey: string | number, params: any);
        ~~~~~~~~~~~~~~~~

Error: node_modules/backlog-js/dist/backlog.d.ts:187:5 - error TS7010: 'deleteProjectGroup', which lacks return-type annotation, implicitly has an 'any' return type.

187     deleteProjectGroup(projectIdOrKey: string | number);

These errors occurred when I enabled noImplicitAny option in tsconfig.json. And noImplicitAny option is enabled by default in Angular projects.

I think it's better to add types to the return value of these functions.