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 optional direction for literals #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rubensworks
Copy link
Member

This adds typing support for base directions in literals, as discussed in rdfjs/data-model-spec#175

Copy link

changeset-bot bot commented Nov 9, 2023

🦋 Changeset detected

Latest commit: 14f33a2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rdfjs/types Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

data-model.d.ts Outdated

export interface DirectionalLanguage {
language: string;
direction?: 'ltr' | 'rtl' | '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what cases would '' be used as input over undefined

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because direction can be a falsy value, as discussed in the PR here: rdfjs/data-model-spec#175

That actually reminds me, we should also allow null here...

@tpluscode
Copy link
Contributor

This probably is something we should also (like #6) first discuss in the spec itself?

@rubensworks
Copy link
Member Author

This probably is something we should also (like #6) first discuss in the spec itself?

Yes, we have rdfjs/data-model-spec#172 and rdfjs/data-model-spec#175 for this.

But in any case, I think we'll want to put this on hold until w3c/rdf-concepts#79 is resolved.

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.

3 participants