Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Literal types being interpreted as actual type #1

Closed
kaleidawave opened this issue Oct 6, 2020 · 0 comments
Closed

Literal types being interpreted as actual type #1

kaleidawave opened this issue Oct 6, 2020 · 0 comments
Assignees
Labels
bug Something isn't working chef/javascript JS parsing and rendering

Comments

@kaleidawave
Copy link
Owner

Currently chef interprets literal types as being actual types.

> const bDeclaration = VariableDeclaration.fromString(`const b: "abc" = "abc";`);
> bDeclartion
> TypeSignature { name: "abc" }

Which causes them to be rendered without quotations:

> bDeclaration.render(getSettings({scriptLanguage: ScriptLanguages.Typescript}))
> const b: abc = "abc";

Literal types (strings, numbers and booleans) should be recognised in TypeSignature as a Value and parsed accordingly

@kaleidawave kaleidawave added bug Something isn't working chef/javascript JS parsing and rendering labels Oct 6, 2020
@kaleidawave kaleidawave self-assigned this Oct 6, 2020
@kaleidawave kaleidawave mentioned this issue Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working chef/javascript JS parsing and rendering
Projects
None yet
Development

No branches or pull requests

1 participant