Skip to content

#68 💎 handle JS keywords names for types#69

Open
MiaInturi wants to merge 1 commit into
release/apicraft/1.11.3from
#68
Open

#68 💎 handle JS keywords names for types#69
MiaInturi wants to merge 1 commit into
release/apicraft/1.11.3from
#68

Conversation

@MiaInturi

Copy link
Copy Markdown
Contributor

No description provided.

@MiaInturi MiaInturi requested a review from vitrivdolkom June 2, 2026 16:32
@MiaInturi MiaInturi self-assigned this Jun 2, 2026
@MiaInturi MiaInturi added the bug Something isn't working label Jun 2, 2026
Comment on lines +4 to +13
const RESERVED_TYPE_IDENTIFIER_PATTERNS = [
/^(arguments|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|from|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/,
/^(any|as|bigint|boolean|namespace|never|null|number|string|symbol|type|undefined|unknown|void)$/,
/^(console|Array|Date|Error|Function|JSON|Map|Math|Object|Promise|RegExp|Set|WeakMap|WeakSet)$/,
/^(global|process|Buffer)$/,
/^(document|history|location|navigator|window)$/
];

export const getSchemaTypeName = (name: string) => {
const typeName = capitalize(normalizeName(name));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для всех ключевых слов добавляем в начало _ как и heyapi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant