BigInt support in TeleJSON
See original GitHub issueCurrently is you set a component property to an object carrying a BigInt
the entire storybook stops functioning. The console logs show an error trying to serialize this object.
Uncaught TypeError: Do not know how to serialize a BigInt
at JSON.stringify (<anonymous>)
(...)
Code sample to help you get the context :
const invitations = {
isLoading: false,
entities: [{
id: 'd25b99c9-4908-44c6-8ce4-d73768b967c6',
revision: BigInt(1602168054734520320),
firstName: 'Foo',
lastName: 'Bar',
email: 'foo.bar@provider.com',
}]
};
export default {
title: 'Acme/Modules/Invitations/InvitationsList',
component: InvitationsList,
} as Meta;
const Template: Story<InvitationsListProps> = (args) => <InvitationsList {...args} />;
export const Default = Template.bind({});
Default.args = {
invitations
};
Switching to json-bigint which is a drop-in replacement would solve this issue in a blink.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:15 (6 by maintainers)
Top Results From Across the Web
true-json-bigint - npm
This module has a proper support for scientific notation. The original module will parse values like 1e+100 to numeric values but not to...
Read more >The Future of Continuing Education - Masterplan.com
The learning platform for businesses: Choose from over 2000 videos or build your own courses & measure learning success.
Read more >License info, alfresco-ng2-components 5.1.0
Name Version License
@alfresco/js‑api 5.1.0‑384 Apache‑2.0
@angular/animations 14.1.3 MIT
@angular/cdk 14.1.2 MIT
Read more >Volkswagen ID
... https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-bigint ... source-map-support@0.5.21: https://github.com/evanw/node-source-map- ...
Read more >Third Party Software 7.2 | Confluent | UK
@babel/plugin-syntax-bigint, MIT. @babel/plugin-syntax-class- ... Cloud Key Management Service (KMS) API v1-rev20220617-1.32.1, Apache-2.0 ... telejson, MIT.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
what is the next step to resolve this issue?
There’s no reason not to use it… it’s already included in both bundles (preview & manager)