Skip to content

Commit

Permalink
Add support for export declarations.
Browse files Browse the repository at this point in the history
  • Loading branch information
lddubeau committed Jun 19, 2018
1 parent 90399e6 commit f5dfad9
Show file tree
Hide file tree
Showing 80 changed files with 7,347 additions and 429 deletions.
26 changes: 26 additions & 0 deletions examples/basic/src/export-declaration.ts
@@ -0,0 +1,26 @@
// This file contains some export declarations that appear before the
// symbols they export. This is done on purpose to ensure that typedoc
// does not choke on such order, which is legal as far as TS is
// concerned.
export { funcFromMod, someVarFromMod as someVarFromModRenamed, SomeClassFromMod,
SomeInterfaceFromMod as SomeInterfaceFromModRenamed } from "./mod";
export * from "./mod2";

export { exportedLocalFunction, exportedLocalFunction2 }

function exportedLocalFunction(): boolean { return true; }

function exportedLocalFunction2(): boolean { return true; }

export { exportedLocalFunction3 as renamedExportedLocalFunction3,
exportedLocalFunction4 as renamedExportedLocalFunction4 }

function exportedLocalFunction3(a: string, b: number): void {}
function exportedLocalFunction4(c: number, d: string): void {}

const notExportedVar = 1;
export const exportedVar1 = notExportedVar;

export const exportedVar2 = 1;

export default function defaultSymbol() {}
13 changes: 13 additions & 0 deletions examples/basic/src/mod.ts
@@ -0,0 +1,13 @@
export function funcFromMod(a: number): void {
a++;
}

export const someVarFromMod: string = "some value";

export class SomeClassFromMod {
property: number = 1;
}

export interface SomeInterfaceFromMod {
foo: number;
}
15 changes: 15 additions & 0 deletions examples/basic/src/mod2.ts
@@ -0,0 +1,15 @@
export function funcFromMod2(a: number): void {
a++;
}

export const someVarFromMod2: string = "some value";

export class SomeClassFromMod2 {
property: number = 1;
}

export interface SomeInterfaceFromMod2 {
foo: number;
}

export { funcFromMod as funcFromModRenamedInMod2 } from "./mod";
2 changes: 1 addition & 1 deletion gruntfile.js
Expand Up @@ -90,7 +90,7 @@ module.exports = function(grunt)
src: 'dist/test',
options: {
mask: '*.js',
timeout: 10000
timeout: 15000
}
}
}
Expand Down

0 comments on commit f5dfad9

Please sign in to comment.