Skip to content

Commit cd455cd

Browse files
generate .d.ts output too
1 parent ba85170 commit cd455cd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

build-support/typescript-compile.coffee

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ var x = 3;
4141
"y = 3\n\n###* @type {string} ###\nx @= 3\n"
4242
]
4343
}
44+
# finally, it also generates a .d.ts type definition file:
45+
; cat test-map.d.ts
46+
declare var y: any;
47+
/** @type {string} */
48+
declare var x: string;
4449
'''
4550

4651
assert = require 'assert'
@@ -149,7 +154,9 @@ checkMappedJsDoc = (mappedCompiled, options) ->
149154
exitCode = if emitResult.emitSkipped then 1 else 0
150155
process.exit exitCode
151156

157+
152158
checkMappedJsDoc byJsPath,
153159
allowJs: yes
154160
checkJs: yes
155-
noEmit: yes
161+
declaration: yes
162+
emitDeclarationOnly: yes

0 commit comments

Comments
 (0)