Skip to content

Commit 61167b6

Browse files
committed
Fixing a few issues
1 parent f2be34a commit 61167b6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9684,7 +9684,7 @@ module ts {
96849684
}
96859685
}
96869686
}
9687-
else if (node.kind !== SyntaxKind.ExportAssignment && node.flags & NodeFlags.Export) {
9687+
else if (node.kind !== SyntaxKind.ExportAssignment && node.flags & NodeFlags.Export && !(node.flags & NodeFlags.Default)) {
96889688
return true;
96899689
}
96909690
}

src/compiler/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ module ts {
501501
}
502502

503503
export interface FunctionDeclaration extends FunctionLikeDeclaration, Statement {
504-
name: Identifier;
504+
name?: Identifier;
505505
body?: Block;
506506
}
507507

@@ -825,7 +825,7 @@ module ts {
825825
}
826826

827827
export interface ClassDeclaration extends Declaration, ModuleElement {
828-
name: Identifier;
828+
name?: Identifier;
829829
typeParameters?: NodeArray<TypeParameterDeclaration>;
830830
heritageClauses?: NodeArray<HeritageClause>;
831831
members: NodeArray<ClassElement>;

src/services/navigationBar.ts

+5
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,11 @@ module ts.NavigationBar {
415415
}
416416

417417
function createClassItem(node: ClassDeclaration): ts.NavigationBarItem {
418+
if (!node.name) {
419+
// An export default class may be nameless
420+
return undefined;
421+
}
422+
418423
var childItems: NavigationBarItem[];
419424

420425
if (node.members) {

0 commit comments

Comments
 (0)