Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix]: fix typecheck #37

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

momodaka
Copy link

@momodaka momodaka commented Nov 9, 2023

Fix the following type check errors,


> @starkware-industries/[email protected] typecheck
> tsc --noemit

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint-scope/index.d.ts:32:10 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

32     set: Map<string, Variable>;
            ~~~

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:70:14 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

70         set: Map<string, Variable>;
                ~~~

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:787:59 - error TS2304: Cannot find name 'IterableIterator'.

787     type ReportFixer = (fixer: RuleFixer) => null | Fix | IterableIterator<Fix> | Fix[];
                                                              ~~~~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:871:17 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

871     getRules(): Map<string, Rule.RuleModule>;
                    ~~~

src/lib/gateway-base.ts:55:6 - error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.

55   ): Promise<any> {
        ~~~~~~~~~~~~

src/lib/gateway-base.ts:68:14 - error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.

68       return Promise.reject(err.response?.data);
                ~~~~~~~

src/lib/gateway/gateway.ts:132:14 - error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.

132       return Promise.reject({...err, txId});
                 ~~~~~~~

src/utils/api-request.ts:18:12 - error TS2550: Property 'assign' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

18     Object.assign(config.headers, customHeaders);
              ~~~~~~

src/utils/api-request.ts:21:26 - error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.

21   (error: AxiosError) => Promise.reject(error)
                            ~~~~~~~

src/utils/api-request.ts:30:26 - error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.

30   (error: AxiosError) => Promise.reject(error)
                            ~~~~~~~

src/utils/api-request.ts:48:5 - error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.

48 }): Promise<AxiosResponse> => {
       ~~~~~~~~~~~~~~~~~~~~~~

src/utils/api-request.ts:52:19 - error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

52     const https = require('https');
                     ~~~~~~~

src/utils/api-request.ts:59:21 - error TS2550: Property 'assign' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

59     headers: Object.assign({}, DEFAULT_HEADERS, headers),
                       ~~~~~~

Found 13 errors in 5 files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant