Skip to content

Conversation

@Reeywhaar
Copy link
Contributor

@Reeywhaar Reeywhaar commented Jan 24, 2026

Without such change I get errors coming from the package in my main project, even with skipLibCheck and node_modules in excludes in tsconfig.json. Seems that typescript, when it resolves types, takes first *.ts or *d.ts value in exports field. And so when it performs typecheck it follows with raw source instead of declarations.

My PR makes ts happy while codegen is still working.

Errors example:

[12:12:59 AM] Starting compilation in watch mode...

node_modules/react-native-navigation/src/adapters/TouchablePreview.tsx:2:28 - error TS7016: Could not find a declaration file for module 'prop-types'. '/Users/reeywhaar/Code/kidsout/app/node_modules/prop-types/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/prop-types` if it exists or add a new declaration (.d.ts) file containing `declare module 'prop-types';`

2 import * as PropTypes from 'prop-types';
                             ~~~~~~~~~~~~

node_modules/react-native-navigation/src/commands/OptionsCrawler.ts:15:34 - error TS2307: Cannot find module 'src/adapters/UniqueIdProvider' or its corresponding type declarations.

15 import { UniqueIdProvider } from 'src/adapters/UniqueIdProvider';
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-navigation/src/components/ComponentWrapper.tsx:3:26 - error TS7016: Could not find a declaration file for module 'react-lifecycles-compat'. '/Users/reeywhaar/Code/kidsout/app/node_modules/react-lifecycles-compat/react-lifecycles-compat.cjs.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/react-lifecycles-compat` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-lifecycles-compat';`

3 import { polyfill } from 'react-lifecycles-compat';
                           ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-navigation/src/components/Modal.tsx:3:56 - error TS2307: Cannot find module 'src/interfaces/Options' or its corresponding type declarations.

3 import { AnimationOptions, ViewAnimationOptions } from 'src/interfaces/Options';
                                                         ~~~~~~~~~~~~~~~~~~~~~~~~

[12:13:14 AM] Found 4 errors. Watching for file changes.
"react-native-navigation": "8.7.3",
"typescript": "5.9.2",

@Reeywhaar
Copy link
Contributor Author

@markdevocht markdevocht requested a review from gosha212 January 26, 2026 07:17
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