File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ export function getFileAnnotations(sourceFile: ts.SourceFile): AnnotationsMap {
105105function getTagArgsFromComment ( tag : ts . JSDocTag ) : string [ ] {
106106 if ( tag . comment ) {
107107 if ( typeof tag . comment === "string" ) {
108- return tag . comment . split ( " " ) ;
108+ const firstLine = tag . comment . split ( "\n" ) [ 0 ] ;
109+ return firstLine . trim ( ) . split ( " " ) ;
109110 } else {
110111 return tag . comment . map ( part => part . text ) ;
111112 }
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ escapedCharsInTemplateString = "\\\\ \\0 \\b \\t \\n \\v \\f \\" ' \`"
3636nonEmptyTemplateString = ("Level 0: \\ n\\ t " .. ("Level 1: \\ n\\ t\\ t " .. ("Level 3: \\ n\\ t\\ t\\ t " .. "Last level \\ n --") .. " \\ n --") .. " \\ n --") .. " \\ n --""
3737` ;
3838
39+ exports [` Transformation (customNameWithExtraComment) 1` ] = ` "TestNamespace.pass()"` ;
40+
3941exports [` Transformation (customNameWithNoSelf) 1` ] = ` "TestNamespace.pass()"` ;
4042
4143exports [` Transformation (exportStatement) 1` ] = `
Original file line number Diff line number Diff line change 1+ /** @noSelf */
2+ declare namespace TestNamespace {
3+ /**
4+ * @customName pass
5+ * The first word should not be included.
6+ **/
7+ function fail ( ) : void ;
8+ }
9+
10+ TestNamespace . fail ( ) ;
You can’t perform that action at this time.
0 commit comments