Skip to content

Commit

Permalink
add explanation for satisfies
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Mar 14, 2023
1 parent 2ec8f0b commit f0d4dc2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/custom-output-paths/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export const lists: Lists = {
where: {
title: { equals: 'Home' },
},

// we use Typescript's satisfies here as way to ensure that
// this is the contextualised type - you don't need this
//
// it is helpful for us to check that the example is not
// broken by code changes
})) satisfies readonly { title: string; content: string }[];

console.log(posts);
Expand Down

0 comments on commit f0d4dc2

Please sign in to comment.