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

Typing issue with custom build #576

Closed
hubgit opened this issue Mar 19, 2018 · 2 comments
Closed

Typing issue with custom build #576

hubgit opened this issue Mar 19, 2018 · 2 comments

Comments

@hubgit
Copy link
Contributor

hubgit commented Mar 19, 2018

Issue

I'm following the custom build instructions and everything's working well apart from an issue with types that I haven't been able to resolve:

When using import RxDB from 'rxdb/plugins/core' (where rxdb/plugins/core/index.d.ts contains import * as RxDB from '../../src/index';) tsc produces the error node_modules/rxdb/plugins/core/index.d.ts(1,23): error TS7016: Could not find a declaration file for module '../../src/index'. '[…]/node_modules/rxdb/src/index.js' implicitly has an 'any' type.

The suggested resolution, adding declare module 'rxdb', doesn't help in this situation.

[edit] I can work around this by enabling TypeScript's skipLibCheck, so it's not too much of a problem.

Info

  • Environment: browser
  • Stack: TypeScript 2.7.2
pubkey added a commit that referenced this issue Mar 19, 2018
@pubkey pubkey closed this as completed in fbc003f Mar 19, 2018
@pubkey
Copy link
Owner

pubkey commented Mar 19, 2018

Hi @hubgit
Thanks for finding this out. I could not reproduce this, but think I found the problem. Can you try this out by modifying the typings of the core-plugin in your node_modules-folder.

@hubgit
Copy link
Contributor Author

hubgit commented Mar 20, 2018

Thanks - that seems to fix the warning.

When using a custom build, i.e. importing RxDB from "rxdb/plugins/core", where should an application import things like RxDocument and RxCollection from, that would normally be imported from "rxdb"?

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

No branches or pull requests

2 participants