Shiba

Results 35 comments of Shiba

I was thinking and, or maybe something like: ```css div > :$Foo { ... } div > :$Foo(div) { ... } ``` Also can be used like ```css div >...

> Having a way to target components with CSS would be awesome. > > There must be existing proposals or discussions that have touched on this but for me personally...

I agree with @zayenz If you are not using something other that Prisma to manipulate database, you are not gonna set a number bigger than max JS number value anyway....

Or something like @matthewmueller said > Something like: > > ```ts > user = toInts(user) > // or > user.age = toInt(user.age) > ``` > > _(I don't think TS...

> `JSON.stringify` is not a great option, if you want to perform calculations based on the result of the query. This feature is direly needed on our hands. Since the...

> I don't want to manually do `toNumber` everywhere I use the model. i understand, i had my own API wrapping Prisma, and i was just using it there. but...

Isn't the test suppose to be like this? https://www.typescriptlang.org/play?ts=4.9.5&ssl=14&ssc=2&pln=1&pc=1#code/JYOwLgpgTgZghgYwgAgIJSnAngYQPYgDOYUArgmHlMgN4BQAkMIeplgDwAqyEAHpCAAmhZKRABrEHgDuIANoBdZAB9kUCHEEEANllESpsxQD4AFHCgBzAFzJuqsZJkgAlLYuXkzO3QC+dOhgxCmACZEhiLjMANzhtUghbeztFF1pGBAJiLxAQaGQAXmRTaKTUwuN0hgYAehrGf0ZgGGLWbAA6ZjasEriElzT6atj4iEYmXOhe0ZcGvyA

@mattpocock `Unarray` is creating a new array from a type. but the generic `T` is extending array, its might not only be an array. So `T` can be for example...

@mattpocock well then this fixes OP's issue: ```ts isArray(arg: T | T[]): arg is T[] extends T ? T[] : any[]; ``` it takes advantage of these returning `true` ```ts...

@guillaumebrunerie When you do `.isArray(number[])` or `.isArray(number)`, `T` is a `number` `number` doesn't extend `number[]` so `arg` is `any[]` not `T[]`, which is the default behavior, makes the final type...