Devansh Jethmalani
Devansh Jethmalani
```ts import { pm } from "@sthir/predicate/macro" pm(x => f(x) ? [x] : []); ``` tranforms to ```ts (t => (x => f(x) ? [x] : [])(t).length === 1); ```...
See https://github.com/devanshj/sthir/issues/11#issuecomment-1272720570
One'd find many redudant intersections in the narrowed type, eg `{ a: number, b: string } & { a: number }`, these should be removed. Apart for the fact it...
```ts import { p, pa } from "@sthir/macro" pa(x, p("!==", undefined)) ``` Gets transformed to... ```ts (t => t !== undefined)(x) ``` This is correct because `pa` could have even...
```ts import { p, pa } from "@sthir/predicate" pa({} as Element, p()) // ~~~ // Type instantiation is excessively deep and possibly infinite.(2589) ``` Not sure why it's happening, possibly...
``` $ cd packages/predicate $ node ../../twoslash-tester/generate tests/types.twoslash-test.ts generating... E:\sthir\node_modules\typescript\lib\typescript.js:10384 return sourceFile.getPositionOfLineAndCharacter ? ^ TypeError: Cannot read property 'getPositionOfLineAndCharacter' of undefined at Object.getPositionOfLineAndCharacter (E:\sthir\node_modules\typescript\lib\typescript.js:10384:27) at E:\sthir\node_modules\@typescript\twoslash\dist\twoslash.cjs.development.js:681:25 at Array.map () at...