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

Using index.d.ts in source code #11

Open
mohit-singh-pepper opened this issue Jul 6, 2022 · 3 comments · May be fixed by #12
Open

Using index.d.ts in source code #11

mohit-singh-pepper opened this issue Jul 6, 2022 · 3 comments · May be fixed by #12

Comments

@mohit-singh-pepper
Copy link

mohit-singh-pepper commented Jul 6, 2022

why are you using a .d.ts for types if its a typescript project ? Due to that , tsc is producing or I should say overriding the index.d.ts in dist folder to

import type { TIsVerified } from './index.d';
declare const isVerified: TIsVerified;
export default isVerified;

because auto-generated index.d.ts and index.d.ts in src conflicts.
Renaming the type file in src fixes the issue.

@leighs-hammer
Copy link
Owner

Likely just an error/hangover on my side tbh, think I had some hangover from the original non TS private package I was using that had .d.ts in place.

@leighs-hammer
Copy link
Owner

I Will action a change to that name to index.types.ts or similar when I get a chance.

@mohit-singh-pepper
Copy link
Author

Opened a PR for the same if you don't mind. Would prefer using published lib in code instead of building for source.

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