clutz
clutz copied to clipboard
Invalid d.ts generated from typedef with invalid field name
goog.module('demo');
/**
* @typedef {{
* name: string,
* container-url: string,
* run-command: (string|undefined),
* run-args: (string|undefined),
* options: {
* privileged: boolean
* }
* }}
*/
exports.X;
The hyphenated names show up in the output dts verbatim, e.g. { container-url : string, ... }
.
We should instead quote them.
Note: you might wonder how these can even be used from Closure code. The answer seems to be using quoted access. (You can codesearch in g3 for an example of this typedef.)