-
Notifications
You must be signed in to change notification settings - Fork 184
ts options & data #1008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
ts options & data #1008
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can we find a way to not duplicate the contents of the README? I really don’t want the documentation to be duplicated—it will almost immediately get out of sync and be burdensome to keep in sync. I think either the JSDoc should be automatically extracted from the README or, perhaps more likely, vice versa. |
@mbostock I'm working on that this week 👍 |
test valueof (null, ()=>{})
(renames ObjectDatum to Row, and DatumKeys to FieldNames)
Fil
added a commit
that referenced
this pull request
Jul 31, 2022
context.ts src/options api.ts and options.ts fix type formatAuto scales/index scales/schemes scales/schemes.ts src/stats stats.ts remove common.ts for now symbols symbols.ts marks/marker marker.ts; changing the API for marker the second argument for markers has not been documented yet; changing it from *context* = {document} to *document* style style.ts src/transforms/basic transform/basic.ts transform/identity transforms/identity.ts transforms/group transforms/groups.ts transforms/inset transforms/inset.ts transforms/map transforms/map.ts transforms/select transforms/select.ts transforms/stack transforms/stack.ts transforms/interval transforms/interval.ts transforms/normalize transforms/normalize.ts transforms/window transforms/window.ts transforms/bin transforms/bin.ts clean-up valueof, map renames & clean-up on ValueAccessor valueof cleaner cleaner defs for data and columns Add stack error messages when X or Z are missing and the specified order requires them move data types to src/data.ts too much typing README documentation and links for Plot.column, Plot.valueof and Plot.transform (aka basic) options.ts copied from 6b6aa86 keep in sync with #1008 follow #1008 on pXX follow #1008 Datum can also be an array of values, with typical accessors being "length", "0", "1"… more typings basic.ts is working transforms: identity, inset, interval, map window, and a bit of progress on stack normalize select stack bin group markers and symbols arrayify comes back difficulty typing Trasnforms vs Initializer, because Plot.sort applies to either
just maybeZero remains snapshot
…ts to type checker
squash squash squash
Closed
superseded by #1024 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
data.ts
Documents the types of data that are expected by Marks, and the way they are handled internally (via valueof, arrayify, map…). Facets, groups &c are represented by a
Series
, an index into the columnar representation of the data.options.ts
Plot.valueof and Plot.column get their JSDoc from the README
Type safety issues:
Duck-typing was interesting to type; I tried two methods:
maybe the second version is better, esp. if we disabled
@typescript-eslint/no-non-null-assertion
on the whole project?I'm still hesitating between the myriad ways one can specify an object. Let me know which one you prefer ( {[key: string]: any} over Record<<……>>)?
(Also a reminder to merge in cli, since we need the mv separate from the subsequent changes, rather than a file deletion+addition.)
(first part of #1005)
todo: