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

ensure to export declaration files for TS after babel transpilation #13

Closed
Tracked by #11
pyramation opened this issue Apr 7, 2022 · 0 comments
Closed
Tracked by #11
Labels
⚙️ task A task belongs to an epic

Comments

@pyramation
Copy link
Collaborator

pyramation commented Apr 7, 2022

https://www.typescriptlang.org/docs/handbook/babel-with-typescript.html

"compilerOptions": {
  // Ensure that .d.ts files are created by tsc, but not .js files
  "[declaration](https://www.typescriptlang.org/tsconfig#declaration)": true,
  "[emitDeclarationOnly](https://www.typescriptlang.org/tsconfig#emitDeclarationOnly)": true,
  // Ensure that Babel can safely transpile files in the TypeScript project
  "[isolatedModules](https://www.typescriptlang.org/tsconfig#isolatedModules)": true
}

it's possible we'll need run 3 processes

  1. ts-proto
  2. babel transpile
  3. TS declaration generation

https://v4.chriskrycho.com/2018/how-to-bundle-typescript-type-definitions.html

  1. properly link the typings

https://medium.com/jspoint/typescript-type-declaration-files-4b29077c43
https://stackoverflow.com/questions/48952313/what-to-put-in-package-json-types-field-for-typescript-based-libs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ task A task belongs to an epic
Projects
None yet
Development

No branches or pull requests

2 participants