Skip to content

Commit

Permalink
chore: downgrade typescript to ^4
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore committed Aug 11, 2023
1 parent 8d43848 commit 7c5d1c2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
10 changes: 5 additions & 5 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
Expand Up @@ -82,7 +82,7 @@
"size-limit": "^8.2.6",
"standard-version": "^9.5.0",
"ts-expect": "^1.3.0",
"typescript": "^5.1.6",
"typescript": "^4.9.5",
"vite": "^4.4.9",
"vite-plugin-sdk": "^0.1.1",
"vitest": "^0.34.1"
Expand Down
32 changes: 14 additions & 18 deletions test/types/fields-link.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,14 @@ expectType<prismic.LinkField<"foo">>({
tags: [],
lang: "string",
});
expectType<prismic.LinkField<"foo">>(
expectType<prismic.LinkField<"foo">>({
link_type: prismic.LinkType.Document,
id: "string",
// @ts-expect-error - Document type must match the given type.
{
link_type: prismic.LinkType.Document,
id: "string",
type: "string",
tags: [],
lang: "string",
},
);
type: "string",
tags: [],
lang: "string",
});

/**
* Supports custom document language for document links.
Expand All @@ -122,16 +120,14 @@ expectType<prismic.LinkField<string, "fr-fr">>({
tags: [],
lang: "fr-fr",
});
expectType<prismic.LinkField<string, "fr-fr">>(
expectType<prismic.LinkField<string, "fr-fr">>({
link_type: prismic.LinkType.Document,
id: "string",
type: "string",
tags: [],
// @ts-expect-error - Document language must match the given type.
{
link_type: prismic.LinkType.Document,
id: "string",
type: "string",
tags: [],
lang: "string",
},
);
lang: "string",
});

/**
* Supports custom document data for document links.
Expand Down

0 comments on commit 7c5d1c2

Please sign in to comment.