Skip to content

Commit bdd49bc

Browse files
authored
avoid syntax error in .d.ts when the module names end up long (#273)
It is not legal typescript to wrap a `declare module "foo/bar" {` statement - this is a SyntaxError. as such, we need to `self.emit()` this statement instead of `self.emit_wrapped_text()`.
1 parent 9600065 commit bdd49bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stone/backends/tsd_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def _generate_types(self, namespace, spaces_per_indent, extra_args):
249249
if namespace.doc:
250250
self._emit_tsdoc_header(namespace.doc)
251251

252-
self.emit_wrapped_text(self._get_top_level_declaration(namespace.name))
252+
self.emit(self._get_top_level_declaration(namespace.name))
253253

254254
with self.indent(dent=spaces_per_indent):
255255
for data_type in data_types:

0 commit comments

Comments
 (0)