Style Guidelines

Rembrandt repositories are following style guidelines and coding conventions from Typescript Deep Dive, a comprehensive Typescript book. In addition to these guidelines we enforce the following rules:

Filenames

  • Use PascalCase.ts for classes

  • Use camelCase.ts for instances

Reason: Default export for files is clear

Class as default export

Bad

export default class HelloWorld {}
helloWorld.ts

Good

export default class HelloWorld {}
HelloWorld.ts

Instance as default export

Bad

export default const helloWorld: string = 'Hello World!';
HelloWorld.ts

Good

export default const helloWorld: string = 'Hello World!';
helloWorld.ts