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

Typescript optional parameter/field syntax (?:) #387

Closed
mst101 opened this issue Dec 13, 2022 · 2 comments
Closed

Typescript optional parameter/field syntax (?:) #387

mst101 opened this issue Dec 13, 2022 · 2 comments

Comments

@mst101
Copy link

mst101 commented Dec 13, 2022

When specifying an optional parameter or field within a typescript fenced code block, both the question mark and colon are omitted:

function test(optionalParam?: string) {
  return `test${optionalParam}`
}

interface Test {
  optionalField?: string
}

See example here

@muenzpraeger
Copy link
Collaborator

Also fixed with #377

@muenzpraeger
Copy link
Collaborator

0.12.0 with the aforementioned PR is out.

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