-
Navigate to
src
-
Create a folder for the feature that your type most belongs to
Note: If your new type belongs to a feature that's already in here, navigate to that folder
-
Inside that folder, create a new file whose name follows the pattern
i-<name-of-feature>.ts
src |__ FeatureA | |__ i-feature-a.ts |__ FeatureB |__ i-feature-b.ts
Note: The names of these files are not visible when importing the types into another project, so their names don't need to be perfect
-
In the newly created file, add your new type(s)
export type MyNewType = { prop1: string; prop2: number; prop3: boolean; };
OR
export interface MyNewType { prop1: string; prop2: number; prop3: boolean; };
-
Export your new file in
src/index.ts
export * from './FeatureA/i-feature-a';
red5seeker7-custom-package
1.0.15 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i red5seeker7-custom-package
Weekly Downloads
1
Version
1.0.15
License
none
Unpacked Size
3.36 kB
Total Files
10