question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BigInt support in TeleJSON

See original GitHub issue

Currently 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:open
  • Created 3 years ago
  • Reactions:4
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
tzelon-cypatorcommented, Oct 7, 2022

what is the next step to resolve this issue?

2reactions
ndelangencommented, Jul 2, 2021

There’s no reason not to use it… it’s already included in both bundles (preview & manager)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found