# Introduction In this PR using the Ts AST dynamically compute what to export, gathering non-runtime types and interface in an `export type` [Export type TypeScript documentation](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html) From ```ts // index.ts export * from "submodule" ``` To ```ts export type { SomeType } from "submodule"; export { SomeFunction, SomeConst } from "submodule"; ``` close https://github.com/twentyhq/core-team-issues/issues/644 ## Motivations - Most explicit and maintainable - Best for tree-shaking - Clear dependency tracking - Prevents name collisions ## Important note Please keep in mind that I will create, very soon, a dedicated `generate-barrel` package in our yarn workspaces in order to: - Make it reusable for twenty-ui - Split in several files - Setup lint + tsconfig - Add tests ## Conclusion As usual any suggestions are more than welcomed !
12 lines
452 B
TypeScript
12 lines
452 B
TypeScript
/*
|
|
* _____ _
|
|
*|_ _|_ _____ _ __ | |_ _ _
|
|
* | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file
|
|
* | | \ V V / __/ | | | |_| |_| | Any edits to this will be overridden
|
|
* |_| \_/\_/ \___|_| |_|\__|\__, |
|
|
* |___/
|
|
*/
|
|
|
|
export { WorkspaceActivationStatus } from './types/WorkspaceActivationStatus';
|
|
export { isWorkspaceActiveOrSuspended } from './utils/isWorkspaceActiveOrSuspended';
|