bcherny/json-schema-to-typescript

SyntaxError: Cannot set a numeric title

Open

#185 opened on Sep 17, 2018

View on GitHub
 (3 comments) (1 reaction) (0 assignees)TypeScript (449 forks)github user discovery
buggood first issuehelp wanted

Repository metrics

Stars
 (3,302 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

{
		"type": "object",
		"required": [ "status" ],
		"properties": {
				"status": {
						"type": "string",
						"title": "200",
						"example": "200",
						"description": "...."
					}
		}
}
(node:46816) UnhandledPromiseRejectionWarning: SyntaxError: Declaration or statement expected. (4:1)
  2 |  * ...
  3 |  */
> 4 | export type 200 = string
    | ^
  5 | 
  6 | export interface Request {
  7 | status?: 200
    at e (/Users/monolithed/workspace/vtb/fe-api-doc/node_modules/prettier/parser-typescript.js:1:329)
``

Contributor guide