OnkelTem
Explore posts from serversAarktype
•Created by OnkelTem on 10/14/2024 in #questions
Multiple @ark registries detected
I'm receiving this error in a Nextjs app:
I use it in my project once:
Ideas?
Version: 2.0.0-rc.15
26 replies
DrawString doesn't update text / Windows Forms
Hi. I'm new to C# development. I create a control on a form and want to print its ClientRectangle.
Whenever I resize the parent form, OnPaint gets called but text doesn't change. Yet the console message is of course changing. Why it happens?
18 replies
Aarktype
•Created by OnkelTem on 10/17/2023 in #questions
ParseError: '3.0' was parsed as a number but could not be narrowed to a literal value.
I'm not sure yet, where does this come from, but does it say anything to you?
21 replies
Aarktype
•Created by OnkelTem on 10/17/2023 in #questions
CJS/ESM issue with arktype
I installed arktype. It's a ESM thing, and it broke my building process.
To fix it, I had to switch to building with babel and had to set these values in tsconfig.json::
However, now ts-node stopped working and hence - mocha and all my tests written in TS:
Any ideas?
68 replies
Aarktype
•Created by OnkelTem on 10/16/2023 in #questions
The inferred type of '... cannot be named without a reference to '../../../../node_modules/arktype/
I receive this strange message:
What's weird is that I don't see it in VSCode when editing code, but only when attepmting to build the project.
Here is the code it's referrencing:
Here
config$$
is a scope. How to properly type it?67 replies
Aarktype
•Created by OnkelTem on 10/15/2023 in #questions
Need help with typing scope output properly
I've got one crazy idea to declare types as scopes to access validators independently
27 replies
Aarktype
•Created by OnkelTem on 10/15/2023 in #questions
non-empty string - how to?
How to declare a schema with 'string' type but... not empty, i.e. which is banning
""
?58 replies
Aarktype
•Created by OnkelTem on 10/13/2023 in #questions
How to incorporate existing type?
I have a type imported from a third-party API and I'd like to build it in into my ark type:
86 replies
Aarktype
•Created by OnkelTem on 10/11/2023 in #questions
How to declare an optional schema?
I wonder if it's possible to define a schema that is ok if data is undefined.
E.g. in:
how to declare a schema for
a
?26 replies
Aarktype
•Created by OnkelTem on 10/11/2023 in #questions
Can scopes validate?
Can scopes validate or they are only a collection of types?
10 replies
Aarktype
•Created by OnkelTem on 10/11/2023 in #questions
How to properly make a property of a class type?
I tried this:
but
typeof params.infer
didn't bring the correct type, instead it looks like:
i.e. like some properties74 replies
Aarktype
•Created by OnkelTem on 10/11/2023 in #questions
Utility to make Partials?
Is there a way to get a type that is
Partial<>
from another type?2 replies
Aarktype
•Created by OnkelTem on 10/11/2023 in #questions
default values - how to define them?
I only found an issue by David that it's gonna be implemented, but I cannot find any examples.
6 replies
Aarktype
•Created by OnkelTem on 10/11/2023 in #questions
Using existing enum/const to build a type
Hi folks.
I'm very new to arktype so maybe I'm asking something very simple.
I have a pseudo enum in a third-party module I import.
This const is defined as:
How can I build an ark type from it?
7 replies
Aarktype
•Created by OnkelTem on 10/11/2023 in #questions
How to import `arktype` into a typescript project?
I do it like this:
However, I get an error:
I tried to specify path to
cjs
version, but it didn't work:
How to get it imported?33 replies