Piarre's snippetypescript
Basic TypeScript snippetypescript for me (or you).
Features
Variables
Typed constant
const MyConstant: any = null;
Typed variable
let|var MyVariable: any = null;
Interface
interface MyInterface {}
Type
type MyType = any;
Functions
Simple function
function MyFunction(param: any) {}
Exported function
export function MyExportedFunction(parma: any) {}
Default export function
default export function MyDefaultExportedFunction(parma: any) {}
Classes
Simple class
class MyClass {}
Exported class #1
export class MyExportedClass {}
Exported class #2
class MyExportedClass {}
export MyExportedClass;
Default exported class #1
export default class MyDefaultExportedClass {}
Default exported class #2
class MyDefaultExportedClass {}
export default MyDefaultExportedClass;