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

feat: handle tuple defaults #1148

Closed
wants to merge 2 commits into from

Conversation

tylersayshi
Copy link
Contributor

I know this does not currently work but hopefully it shows my current misunderstanding and I could get a point in the right direction

For now, I'll just plan to revisit this tomorrow night and see how far I can get

closes #951

@Dimava
Copy link
Contributor

Dimava commented Sep 25, 2024

I did some work in #1139 please make sure the thing you're trying to make does not exist in the latest rc release
What are you trying to do exactly? I did work with defaults so hopefully can point where you need

@Dimava
Copy link
Contributor

Dimava commented Sep 25, 2024

Okay I see this doesn't work, and it's the target of this #951

let t4 = type(["string", ["number", "=", 5]])
console.log(t4(['a',,])+'')

@Dimava
Copy link
Contributor

Dimava commented Sep 25, 2024

@tylerlaws0n first log the .json value of a type() to see the schema, then search for its properties (.json.sequence.prefix) and what code does work with them

I know this does not currently work but hopefully it shows my current
misunderstanding and I could get a point in the right direction

For now, I'll just plan to revisit this tomorrow night and see
how far I can get

closes arktypeio#951
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (merged or closed)
Development

Successfully merging this pull request may close these issues.

Default values for tuple elements
2 participants