0.2.0 • Published 4 months ago

ts-closure-transform v0.2.0

Weekly downloads
16
License
BSD-3-Clause
Repository
github
Last release
4 months ago

ts-closure-transform

This package defines TypeScript code transformations that enable the serialize-closures package to serialize functions.

These transformations will rewrite all function definitions to include a special __closure property. The serializer uses that __closure property to figure out which variables are captured by the function.

How you inject this transform depends on the webpack loader you're using. For ts-loader you apply the following:

import { beforeTransform, afterTransform } from 'ts-closure-transform';
// ...
loader: 'ts-loader',
options: {
  getCustomTransformers: () => ({
    before: [beforeTransform()],
    after: [afterTransform()]
  })
}
// ...

Note that ts-closure-transform is strictly a dev dependency: there's no need to package it with your application.

0.2.0

4 months ago

0.1.8

4 months ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.6-next.0

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.2-next.0

5 years ago

0.1.1

5 years ago