TizzySaurus
TizzySaurus
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
Err, you can do. Might be worth waiting for David to confirm it is indeed a bug.
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
Tl;Dr; I'm fairly certain this is a bug in ArkType (tbc by David), so thanks for reporting this 🙂
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
@ssalbdivad Are you able to confirm that this is the case (i.e. this is unintentional)? Context: the inferred type of a morph that returns an object with valueOf: () => never becomes valueOf: never (instead of keeping valueOf as a function, as it does for when e.g. valueOf: () => number)
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
I assume this is because () => never extends InferredMorph, which I don't think it should.
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
No description
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
This looks like it might just be a bug in ArkType. It's for some reason stripping the function part
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
No description
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
Temporal's ZonedDataTime has
valueOf(): never;
valueOf(): never;
so that part is correct. I'm not entirely sure where the never is coming from.
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
No description
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
No description
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
It seems to want ISO rather than Iso at the end
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
No description
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
And just to confirm, are you using https://www.npmjs.com/package/@js-temporal/polyfill for temporal?
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
Can you send zoneDateTimeRegex?
24 replies
Aarktype
Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
This is the sort of thing that's very difficult to help with without running it ourselves, and unfortunately there's no playground yet for ArkType v2.0 (tbh this is imo the biggest regression from v1.0). I'm on my PC now so will give this a look....
24 replies
Aarktype
Created by ZX on 10/9/2024 in #questions
File type
Would you have that distingiuish between Mb and Mib etc.? Where Mb = 1000^2 bytes and Mib = 1024^2 bytes.
41 replies
Aarktype
Created by Dimava on 10/3/2024 in #questions
Using `atLeastLength` on morphed array
But if you mean generally, then not sure
9 replies
Aarktype
Created by Dimava on 10/3/2024 in #questions
Using `atLeastLength` on morphed array
In this case the array doesn't change in size during the pipe, so you can do type("string[]>1").pipe(...)
9 replies
Aarktype
Created by Stuart B on 9/30/2024 in #questions
Identifying a Date value in an object type
You can do console.log(type("Date").json) to see how it's represented
39 replies
Aarktype
Created by Stuart B on 9/30/2024 in #questions
Identifying a Date value in an object type
value.json.prototype === "Date" iirc
39 replies