mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
parent
85b892fd6a
commit
393464eb18
@ -1682,6 +1682,10 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
function emitInterfaceDeclaration(node: InterfaceDeclaration) {
|
||||
emitPinnedOrTripleSlashComments(node);
|
||||
}
|
||||
|
||||
function emitEnumDeclaration(node: EnumDeclaration) {
|
||||
emitLeadingComments(node);
|
||||
if (!(node.flags & NodeFlags.Export)) {
|
||||
@ -2089,6 +2093,8 @@ module ts {
|
||||
return emitVariableDeclaration(<VariableDeclaration>node);
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
return emitClassDeclaration(<ClassDeclaration>node);
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
return emitInterfaceDeclaration(<InterfaceDeclaration>node);
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
return emitEnumDeclaration(<EnumDeclaration>node);
|
||||
case SyntaxKind.ModuleDeclaration:
|
||||
|
||||
@ -16,3 +16,4 @@ interface Third extends JQueryEventObjectTest, SecondEvent {}
|
||||
|
||||
|
||||
//// [app.js]
|
||||
///<reference path='jquery.d.ts' />
|
||||
|
||||
@ -1,10 +1,20 @@
|
||||
//// [commentOnInterface1.ts]
|
||||
//// [tests/cases/compiler/commentOnInterface1.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
/*! Keep this pinned comment */
|
||||
interface I {
|
||||
}
|
||||
|
||||
// Don't keep this comment.
|
||||
interface I2 {
|
||||
}
|
||||
|
||||
//// [b.ts]
|
||||
///<reference path='a.ts'/>
|
||||
interface I3 {
|
||||
}
|
||||
|
||||
//// [commentOnInterface1.js]
|
||||
//// [a.js]
|
||||
/*! Keep this pinned comment */
|
||||
//// [b.js]
|
||||
///<reference path='a.ts'/>
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
=== tests/cases/compiler/commentOnInterface1.ts ===
|
||||
=== tests/cases/compiler/b.ts ===
|
||||
///<reference path='a.ts'/>
|
||||
interface I3 {
|
||||
>I3 : I3
|
||||
}
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
/*! Keep this pinned comment */
|
||||
interface I {
|
||||
>I : I
|
||||
@ -8,3 +13,4 @@ interface I {
|
||||
interface I2 {
|
||||
>I2 : I2
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
//@filename: a.ts
|
||||
/*! Keep this pinned comment */
|
||||
interface I {
|
||||
}
|
||||
|
||||
// Don't keep this comment.
|
||||
interface I2 {
|
||||
}
|
||||
|
||||
//@filename: b.ts
|
||||
///<reference path='a.ts'/>
|
||||
interface I3 {
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user