Skip to content

Generate proper types declaration file#2

Open
Deadarius wants to merge 1 commit intoEximchain:masterfrom
Deadarius:master
Open

Generate proper types declaration file#2
Deadarius wants to merge 1 commit intoEximchain:masterfrom
Deadarius:master

Conversation

@Deadarius
Copy link

Current modules causes errors when attempting to build in typescript project:

> tsc

node_modules/ink-quicksearch-input/src/QuickSearchInput.tsx:98:42 - error TS2722: Cannot invoke an object which is possibly 'undefined'.

98         if (inkStdin.isRawModeSupported) inkStdin.setRawMode(true);
                                            ~~~~~~~~~~~~~~~~~~~

node_modules/ink-quicksearch-input/src/QuickSearchInput.tsx:102:46 - error TS2722: Cannot invoke an object which is possibly 'undefined'.

102             if (inkStdin.isRawModeSupported) inkStdin.setRawMode(false);
                                                 ~~~~~~~~~~~~~~~~~~~


Found 2 errors.

This is due to declaration file mapped to source code - this causes typescript compiler to check types in the whole source file even if skipLibCheck is set to true

Updating tsconfig to emit actual declaration file and updating corresponding entries in package.json

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