Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const number type throws error #2516

Open
jonnytest1 opened this issue Feb 19, 2024 · 5 comments
Open

const number type throws error #2516

jonnytest1 opened this issue Feb 19, 2024 · 5 comments

Comments

@jonnytest1
Copy link

this schema doesnt work
(in my other example there was also type:"number" but it had the same effect)

{
    "type": "object",
    "properties": {
        "delay": {
            "const": 10
        }
    },
    "$schema": "http://json-schema.org/draft-07/schema#"
}

@jonnytest1
Copy link
Author

i tried adding this at the start of the Javascript.ts#nameStyle method which at least fixes the runtime error
unfortunatly it is still treated as a string

protected nameStyle(original: string, upper: boolean): string { if (typeof original === "number") { return original }

image

@jonnytest1
Copy link
Author

found it
image

@jonnytest1
Copy link
Author

🤔 now i just need to get out the number |

image

@inferrinizzard
Copy link
Contributor

Looks like a duplicate of #2333 #2371

@jonnytest1
Copy link
Author

true , but mine has a PR linked :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants