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

Missing some property exports - for example 'performer` #196

Open
davie-robertson opened this issue Oct 17, 2024 · 0 comments
Open

Missing some property exports - for example 'performer` #196

davie-robertson opened this issue Oct 17, 2024 · 0 comments

Comments

@davie-robertson
Copy link

I'm refactoring my code to use all the types defined in schema-dts for Events and I thought that I could apply the performer type to my existing objects, but there's no export of performer from schema-dts.

There's not much documentation to go on, and maybe this isn't the correct use-case for the library, but is this the expected approach?

import { Person, Organization, Thing } from 'schema-dts';

export type Performer = Person | Organization | Thing;

and then elsewhere in my code I use it like this:

@state() performer: Performer = { '@type': 'Person', name: this.user?.displayName || '' };

// When handling performer updates
private handlePerformerUpdate(performers: Performer[]) {
  this.eventData.performer = performers;
}
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

1 participant