@mrsekut/utils
$ npx jsr add @mrsekut/utils
どのリポジトリでも用意する様なUtilityは一箇所にまとめる
毎回各所でコピペしたり修正したりテストを書いたりするのが面倒なので
todos
なんか生成されている型がおかしいな
これに対して
code:ts
export const sortBy =
<T, R>(prop: (a: T) => R) =>
(a: T, b: T): number =>
prop(a) > prop(b) ? 1 : prop(b) > prop(a) ? -1 : 0;
こういう型が生成されている
code:ts
export declare const sortBy: <T, R>(prop: (a: T) => R) => any;
これ、どこのバグだろう?JSRの内部実装?
書いてた
The package will not be able to generate type declarations for the npm compatibility layer, or “slow types” will be omitted or replaced with any in the generated type declarations. ref 対処法がわからないmrsekut.icon
publishに--allow-slow-typesをつけても変わらなかった
ci
適当にコードを追加する