Skip to content

Commit

Permalink
add date example to JsonView.stories.tsx
Browse files Browse the repository at this point in the history
also add @ts-expect-error on the BigInt prototype thing
  • Loading branch information
John-Paul-R committed Sep 29, 2023
1 parent e7904f1 commit c3e7f4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stories/JsonView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default {

const Template: StoryFn<typeof JsonView> = (args) => <JsonView {...args} />;

// @ts-expect-error toJSON does not exist
// eslint-disable-next-line no-extend-native
BigInt.prototype.toJSON = function () {
return this.toString();
Expand All @@ -52,6 +53,7 @@ const jsonData = {
'': 'empty name property',
'bigint property': BigInt('9007199254740991'),
'number property': 42.42,
'date property': new Date(0),
'boolean property': true,
'null property': null,
'array propery': [1, 2, 3, 4, 5],
Expand Down

0 comments on commit c3e7f4b

Please sign in to comment.