-
-
Wouldn't it be nice to have an instance of operator (for a given statically known type)?
Something that might look like `d instanceof t`
If I'm correct, this could be implemented as:
1. infer the t…
-
### What version of Bun is running?
1.1.30
### What platform is your computer?
Darwin 24.0.0 arm64 arm
### What steps can reproduce the bug?
In my turborepo project, when I run `bun build ./src/i…
-
When I lost many time on non working multi file upload, I was surprised why it's not supported. Moreover, fix is trivial, something like
```ts
[ContentType.FormData]: (input: any) =>
Object.key…
ikzsl updated
2 weeks ago
-
ref: https://openjdk.org/jeps/488
https://bugs.openjdk.org/browse/JDK-8335876
JLS Changes here? => https://cr.openjdk.org/~abimpoudis/instanceof/latest/ - to confirm
Summary
Enhance pattern ma…
-
Rather than making it more syntax soupy, and combining the `!` symbol with a word, "not in" and "not instanceof" read more clearly to me and are much less potentially ambiguous.
This also meshes ni…
-
Something wrong going on here: https://psalm.dev/r/3d69cb785e
But I don't have time to check it for now
-
-
## 概念
- `instanceof` 用来判断一个对象是否是另一个构造函数的实例。
- ***原理是判断构造函数的原型是否出现在对象的原型链上***
## 模拟实现
> `instanceof` 的原理是在对象的原型上查找构造函数的原型,所以实现的时候围绕这一点就可以了。
### 第一版
```js
function myInstanceof(left,…
-
Hi guys,
I'm starting to use ZOD on DDD-oriented classes, and I'm struggling to use the z.instanceof method to type my schema; here is an example
```tsx
const userSchema = z.object({
id: …