[ ] Chore (a non-breaking change which is related to package maintenance)
[x] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
This PR add support for models with IDs that start with a number.
For example, a Custom Type with an API ID of 404_page or a Shared Slice with an API ID of 2ColumnText is now supported.
Before this PR, the code generator generated invalid code by creating types with names starting with a number. This is invalid TypeScript syntax, similar to starting JavaScript variables with a number.
As of this PR, types starting with a number are prefixed with an underscore (_).
Types of changes
Description
This PR add support for models with IDs that start with a number.
For example, a Custom Type with an API ID of
404_page
or a Shared Slice with an API ID of2ColumnText
is now supported.Before this PR, the code generator generated invalid code by creating types with names starting with a number. This is invalid TypeScript syntax, similar to starting JavaScript variables with a number.
As of this PR, types starting with a number are prefixed with an underscore (
_
).404Page
(invalid, throws TypeScript syntax error)_404Page
Fixes: #29
Checklist:
🦒