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

bug: Return type of getContextValueFromId missing null. #67

Open
jeswr opened this issue Oct 11, 2023 · 1 comment
Open

bug: Return type of getContextValueFromId missing null. #67

jeswr opened this issue Oct 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jeswr
Copy link
Contributor

jeswr commented Oct 11, 2023

Currently the return type is string but it should be string | null. The function definition is

public static getContextValueId(contextValue: any): string {
if (contextValue === null || typeof contextValue === 'string') {
return contextValue;
}
const id = contextValue['@id'];
return id ? id : null;
}

This is a breaking change as it causes type errors in the jsonld-streaming-parser when trying to make the change.

@rubensworks
Copy link
Owner

Oh, it looks like we're not using strict yet in the tsconfig for this project.

@rubensworks rubensworks added the enhancement New feature or request label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants