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

Add node parameter to JSONWorkerContribution.getInfoContribution #222

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

charlespwd
Copy link

@charlespwd charlespwd commented Feb 21, 2024

This should be backward compatible and allow implementers to discriminate between value and key nodes in order to return undefined | Promise<MarkedString[]>

Fixes #221

This should be backward compatible and allow implementers to
discriminate between value and key nodes in order to only optionally
return `undefined | Promise<MarkedString[]>`
@aeschli
Copy link
Contributor

aeschli commented Mar 14, 2024

Adding undefined makes sense, but node would not help you discriminating property key or value at least not with the changes in the PR. node is always the value at that point.

if (node.type === 'string') {

@aeschli
Copy link
Contributor

aeschli commented Mar 14, 2024

It should be Thenable<MarkedString[] | undefined>

@aeschli
Copy link
Contributor

aeschli commented Mar 14, 2024

Also if you can add a test case that would be great.

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

Successfully merging this pull request may close these issues.

getInfoContribution is not composable
2 participants