Skip to content

bug: Return type of getContextValueFromId missing null. #67

Open
@jeswr

Description

@jeswr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions