ソースコード

依存タプルを処理する関数の例

現在、おそらく最も強力な型システムを持つと思われるLean 4によるコード。型ファミリーや依存タプルを含む型を定義して、型チェックは型システムに任せる。プログラマは、データの整合性をチェックするようなコードは書かない。処理のみを書く。 /-- 既婚か…

chevrotain .d.ts

export as namespace chevrotain export declare const VERSION: string export type ParserMethod<ARGS extends unknown[], R> = (...args: ARGS) => R /** * This class does not actually exists nor is exposed at runtime. * This is just a helper to avoid duplications in the T</args>…

SVG.js.d.ts

typo: build-in // Type definitions for @svgdotjs version 3.x // Project: @svgdotjs/svg.js // trick to keep reference to Array build-in type declare class BuiltInArray<T> extends Array<T> { } // trick to have nice attribute list for CSS declare t</t></t>…

多項式の計算

/* polynom.ts */ export { listEqual, calcProductCoef, calcProductCoefByList, normalizePolynomList, polynomListEqual, combineSimilarTerms, removeZeroTerms, sortTermsByDeg, normalizePolynom, monomEqual, polynomEqual, } /* ========== */ // 気…