The WithContext type is invalid
Open
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
The `WithContext` type accepts all `Thing` types:
```ts
/** Used at the top-level node to indicate the context for the JSON-LD objects used. The context provided in this type is compatible with the keys and URLs in the rest of this generated file. */
export declare type WithContext = T & {
"@context": "https://schema.org";
};
```
However, `Thing` allows `string` values. For example:
```ts
export const thing: Thing = '';
```
It's not possible to intersect `string` and `object`, which makes the `WithContext` type invalid.
Contributor guide
Assessment
This issue has not been assessed yet.