Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

export class typescript

// Export the named class directly
export class Foo { }

// Export the named class indirectly
class Bar { }
export { Bar }

// Export an instance of the class directly
export const foo = new Foo();

// Export an instance of the class indirectly
const bar = new Bar();
export { bar };
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #export #class #typescript
ADD COMMENT
Topic
Name
5+6 =