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

move @types/tmp to dependencies #56

Open
ehaynes99 opened this issue Nov 20, 2022 · 0 comments
Open

move @types/tmp to dependencies #56

ehaynes99 opened this issue Nov 20, 2022 · 0 comments

Comments

@ehaynes99
Copy link

Currently, the package file has "@types/tmp": "^0.2.0", under devDependencies. However, the types in types.d.ts directly export members of tmp. Unless the consuming app also installs @types/tmp, those types are all missing. This prevents auto-suggestion, but more importantly, prevents the type checker from being able to enforce the parameters.

Re-exported types should be in dependencies instead.

E.g. DirOptions here can't be type checked:

import { FileOptions, DirOptions, TmpNameOptions } from "tmp";
// ...
export function dir(options?: DirOptions): Promise<DirectoryResult>;

results in:
image

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 a pull request may close this issue.

1 participant