Skip to content
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

[atdpy/atdts] support for polymorphic types #303

Open
aryx opened this issue Jun 11, 2022 · 1 comment
Open

[atdpy/atdts] support for polymorphic types #303

aryx opened this issue Jun 11, 2022 · 1 comment
Labels
enhancement feature request Big and small feature requests target:python Issues related to the Python backend (atdpy)

Comments

@aryx
Copy link

aryx commented Jun 11, 2022

See https://github.com/returntocorp/semgrep-interfaces/blob/main/ast_generic_v0.atd
and specially:
type 'a wrap_ = ('a * tok)

type 'a bracket = (tok * 'a * tok)

A simple implementation would be to inline the definition at use time ...

@mjambon
Copy link
Collaborator

mjambon commented Nov 9, 2022

The atd library provides an option to monomorphize all type definitions. This may come in handy.

@mjambon mjambon added enhancement feature request Big and small feature requests target:python Issues related to the Python backend (atdpy) labels Nov 9, 2022
mseri pushed a commit to ocaml/opam-repository that referenced this issue Feb 13, 2023
…n-codec-runtime and atd (2.11.0)

CHANGES:

* atdpy: Support parametrized type definitions (ahrefs/atd#303)
* atdpy: Support options approximately by treating them as nullables (ahrefs/atd#320)
* atdts: Support parametrized type definitions (ahrefs/atd#303)
* atdts: Fix incorrect type for TypeScript readers/writers generated
         for type `abstract`.
* atdts: Fix incorrect type for TypeScript writers of optional fields.
         It was working only in special cases such as `foo?: int`.
* atdts: Eliminate the type alias `type Int = number` since it was
         more confusing than helpful. Occurrences of `Int` are replaced
         by `number /*int*/`.
* atdts: Disable all tslint and eslint rules in generated code so as
         to play well with all tslint and eslint configurations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request Big and small feature requests target:python Issues related to the Python backend (atdpy)
Projects
None yet
Development

No branches or pull requests

2 participants