@nteract/records
TypeScript icon, indicating that this package has built-in type declarations

1.0.4-alpha.0 • Public • Published

nteract records

Philosophy: create very flat records for core data types used in nteract, to be used across applications.

Wait, what about commutable?

Commutable has been awesome and should be borrowed from to build this up. However, commutable relied heavily on Immutable.Map()'s. These lose all the benefits of flow typing, defaults, and direct property access that records have.

Could we add these directly to commutable?

I'd love to. However, I didn't want to make a refactor that required refactoring all the apps that use them, as well as any external usage (Hydrogen included) that would have to adapt to new interfaces.

Where should I start in helping with this effort?

Look over how src/outputs/stream.js and src/outputs/index.js sets up the base types. Implement the other output types in a similar fashion.

  • [x] stream
  • [ ] display_data
  • [ ] execute_result
  • [ ] error

References

Testing

Run

npm t -- records --watch

to run the tests locally while watching to all changes in the records setup.

Types!

If your editor isn't already helping you with this, use

npx tsc -b packages

Documentation

To help figure out where we might end up with documentation for nteract libraries (as opposed to components, which use react-docgen / react-styleguidist ), use documentation.js to run docs for this library.

npm install -g documentation
documentation serve --watch packages/records/src

I have a feeling we'll end up having to do some custom things with our monorepo to make this more palatable.

Package Sidebar

Install

npm i @nteract/records

Weekly Downloads

6

Version

1.0.4-alpha.0

License

BSD-3-Clause

Unpacked Size

84.1 kB

Total Files

54

Last publish

Collaborators

  • hydrosquall
  • benabel
  • alexandercbooth
  • benrussert
  • mpacer
  • theengineear
  • yuvipanda
  • rgbkrk
  • lgeiger
  • ivanov
  • captainsafia
  • peggyrayzis
  • jdetle
  • hasch
  • willingc
  • stormpython
  • crystalline-cat
  • emeeks