the typescript plugin to help emit type symbols for the pigly kernel.
you must use a custom typescript compiler that facilitates using a typescript transformer. see https://github.com/cevek/ttypescript
with @pigly/transformer
transformer active, in your code:
import { SymbolFor } from 'pigly';
let $IFoo = SymbolFor<IFoo>()
...which will get compiled such that SymbolFor<IFoo>
will be replaced with symbol.for("...<type hash>")
currently the transformer is just looking for a method SymbolFor<T>()
and replaces it with the typescript-id for T
. Any changes to how this works will result in a major version bump of this package.
MIT
"pig" licensed under CC from Noun Project, Created by habione 404, FR
@pigly/transformer was derived from https://github.com/YePpHa/ts-di-transformer (MIT)