red5seeker7-custom-package
TypeScript icon, indicating that this package has built-in type declarations

1.0.15 • Public • Published

To Add A New Type

  1. Navigate to src

  2. 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

  3. 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

  4. 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;
    };
  5. Export your new file in src/index.ts

    export * from './FeatureA/i-feature-a';

Readme

Keywords

none

Package Sidebar

Install

npm i red5seeker7-custom-package

Weekly Downloads

1

Version

1.0.15

License

none

Unpacked Size

3.36 kB

Total Files

10

Last publish

Collaborators

  • red5seeker7