0.6.3 • Published 5 years ago

ts-bigint-transform-jsbi v0.6.3

Weekly downloads
83
License
-
Repository
github
Last release
5 years ago

ts-bigint-transform-jsbi

How To Use

import { CompileFactory } from "ts-bigint-transform-jsbi";
import * as ts from "typescript";

const compile = CompileFactory({
  IMPORT_HEADER: `const JSBI = require('jsbi');\nconst BigInt = JSBI.BigInt;\n`
});
compile(process.argv.slice(2), {
  noEmitOnError: true,
  noImplicitAny: true,
  target: ts.ScriptTarget.ESNext,
  module: ts.ModuleKind.CommonJS,
  outDir: "./build"
});

Custom Compile

you can get an transformer to transform code when emit program. and get the transform count in every source file.

import { TransformerFactory } from "ts-bigint-transform-jsbi";
const { transformer, bigintTransformCount } = TransformerFactory(
  (<ts.Program>program).getTypeChecker(),
  { JSBI_GLOBAL_SYMBOL_NAME: "JSBI" }
);

const c: WeakMap<ts.SourceFile, number> = bigintTransformCount;
const t: ts.TransformerFactory<ts.SourceFile> = transformer;
0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago