Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-schemaorg",
"version": "2.0.0",
"version": "2.1.0",
"displayName": "React: Schema.org",
"description": "Typed Schema.org JSON-LD in React",
"authors": [
Expand Down
12 changes: 11 additions & 1 deletion src/json-ld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export function JsonLd(props: JsonLdOptions & { item: Graph }): JSX.Element;
export function JsonLd<T extends Thing>(
props: JsonLdOptions & { item: WithContext<T> }
): JSX.Element;
export function JsonLd(
props: JsonLdOptions & { item: Graph | WithContext<Thing> }
): JSX.Element;
export function JsonLd(
props: JsonLdOptions & { item: Graph | WithContext<Thing> }
) {
Expand Down Expand Up @@ -133,7 +136,14 @@ export function helmetJsonLdProp<T extends Thing>(
innerHTML: string;
};
export function helmetJsonLdProp(
item: WithContext<Thing> | Graph,
item: Graph | WithContext<Thing>,
options?: JsonLdOptions
): {
type: "application/ld+json";
innerHTML: string;
};
export function helmetJsonLdProp(
item: Graph | WithContext<Thing>,
options: JsonLdOptions = {}
): {
type: "application/ld+json";
Expand Down