Skip to content

Instantly share code, notes, and snippets.

@rackaam
Created February 12, 2016 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rackaam/b290fc0d15e53c57721f to your computer and use it in GitHub Desktop.
Save rackaam/b290fc0d15e53c57721f to your computer and use it in GitHub Desktop.
// ClassA.ts
"use strict";
export = ClassA;
class ClassA {
private static c: number;
public static init(n: number) {
if (ClassA.c !== undefined)
throw new Error('Class already initialized');
ClassA.c = n;
}
static foo(bonus: string) {
console.log('foo', ClassA.c, bonus);
ClassA.pfoo();
}
private static pfoo() {
console.log('p coq');
}
}
// other.ts
import ClassA = require('./ClassA');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment