Fixing a few issues

This commit is contained in:
Anders Hejlsberg 2015-03-03 17:06:44 -08:00
parent f2be34a302
commit 61167b68ba
3 changed files with 8 additions and 3 deletions

View File

@ -9684,7 +9684,7 @@ module ts {
}
}
}
else if (node.kind !== SyntaxKind.ExportAssignment && node.flags & NodeFlags.Export) {
else if (node.kind !== SyntaxKind.ExportAssignment && node.flags & NodeFlags.Export && !(node.flags & NodeFlags.Default)) {
return true;
}
}

View File

@ -501,7 +501,7 @@ module ts {
}
export interface FunctionDeclaration extends FunctionLikeDeclaration, Statement {
name: Identifier;
name?: Identifier;
body?: Block;
}
@ -825,7 +825,7 @@ module ts {
}
export interface ClassDeclaration extends Declaration, ModuleElement {
name: Identifier;
name?: Identifier;
typeParameters?: NodeArray<TypeParameterDeclaration>;
heritageClauses?: NodeArray<HeritageClause>;
members: NodeArray<ClassElement>;

View File

@ -415,6 +415,11 @@ module ts.NavigationBar {
}
function createClassItem(node: ClassDeclaration): ts.NavigationBarItem {
if (!node.name) {
// An export default class may be nameless
return undefined;
}
var childItems: NavigationBarItem[];
if (node.members) {