node-app-store-connect-api
pandas-stubs
node-app-store-connect-api | pandas-stubs | |
---|---|---|
1 | 4 | |
37 | 213 | |
- | 3.3% | |
5.5 | 8.6 | |
6 months ago | 9 days ago | |
JavaScript | Python | |
ISC License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
node-app-store-connect-api
-
TypeScript is terrible for library developers
Here's a perfect example. I maintain a simple Node library designed to connect to Apple's App Store Connect API. https://github.com/dfabulich/node-app-store-connect-api
It accepts, as a parameter, an URL for Apple's REST API. My library handles authentication, and returns the parsed JSON result, with a handful of tweaks to make the API more usable in JavaScript.
Depending on which URL you request, you'll get different result object back. You could get a single object in response, or an array of objects, and the type of returned objects is different for each URL type.
How would you add TypeScript types to this API? Well, Apple provides an OpenAPI documentation of all of their URLs, which I could use to autogenerate types, but then, how would I handle all of those types in response to the user's string input?
Well, it turns out that TypeScript is so amazingly fancy that you can write very clever code to parse strings at compile time, extracting parameter types etc. from string literal types. https://lihautan.com/extract-parameters-type-from-string-lit...
The documentation explains how an API like this:
app.get('/purchase/[shopid]/[itemid]/args/[...args]')
pandas-stubs
-
We are the developers behind pandas, currently preparing for the 2.0 release :) AMA
There is a typing effort that is led by some core members (unfortunately none of them takes part today). You can check the stubs package out at https://github.com/pandas-dev/pandas-stubs. I am not really familiar with the progress there
-
Is there a way to have Eglot pickup the virtual env?
I think the issue is that pandas provides its stubs via a separate package namely pandas-stubs. It seems some packages provide their stubs in a separate package i.a.w PEP561. If I install this package I get completions etc. as you might expect.
-
TypeScript is terrible for library developers
It gets a lot more complicated than that. One of many, many examples: https://github.com/pandas-dev/pandas-stubs/blob/v1.4.3.22082...
What are some alternatives?
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
django-stubs - PEP-484 stubs for Django
reselect - Selector library for Redux
lxml-stubs - Type stubs for the lxml package
flow-typed - A central repository for Flow library definitions
pfun - Functional, composable, asynchronous, type-safe Python.
dts-cli - Zero-config CLI for TypeScript package development
bench-warmers - DigThatData's Public Brainstorming space
tsdx - Zero-config CLI for TypeScript package development
returns - Make your functions return something meaningful, typed, and safe!
GoJS, a JavaScript Library for HTML Diagrams - JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
bulk-exif-to-excel - Bulk exif data export to excel