@oryxqa/types
v7.6.9
Published
API type definitions
Downloads
154
Readme
Oryxqa/types
Adding new types
- Add fields to the existing types or add new type def files for new entities
- Add (?) operator to the nullable fields
@Column({ nullable: true }) subsidy_value: number; should be subsidy_value?:number
- Add (?) operator to the relationship fields
@OneToMany( () => ScholarshipApplication, (application: ScholarshipApplication) => application.finalized_scholarship, ) finalized_applications: ScholarshipApplication[]; should be finalized_applications?: ScholarshipApplication[]
- Avoid enums and use typescript union types
export enum Status { SUBMITTED = 'Submitted', PROCESSING = 'Processing', GRANTED = 'Granted', REFUSED = 'Refused', } @Column({ nullable: true, enum: Status, default: Status.SUBMITTED }) status: Status; should be status: 'Submitted' | 'Processing' | 'Granted' | 'Refused'
Publishing
- Increment the version in package.json file
- Run
npm run publish
Ignore the npm error after running this command. It should work.
Post Publishing
- Commit code to the version control
- Fresh install the new version from the projects where this library is being used