diff --git a/srcgen/dotUtils.js b/srcgen/dotUtils.js index db0a719..db7be93 100644 --- a/srcgen/dotUtils.js +++ b/srcgen/dotUtils.js @@ -56,7 +56,9 @@ function normalizeArgName(name) { } function normalizePropName(propName) { - const out = changeCase.snakeCase(propName); + let out = changeCase.snakeCase(propName); + if (/^\d/.test(out)) // No leading digits. + out = 'x' + out; if ('type' === out) return 'r#' + out; return out;