Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Commit

Permalink
docs: use ES6 import in TypeScript README example (#140)
Browse files Browse the repository at this point in the history
Updates the TypeScript example to use the ES6 import syntax like the other examples. Includes the change to `Worker.ts` mentioned in #111 to get it to work with `import` instead of `require`.
  • Loading branch information
thallada authored and shellscape committed May 27, 2018
1 parent 04bc4ff commit 612511d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ declare module "worker-loader!*" {
constructor();
}

export = WebpackWorker;
export default WebpackWorker;
}
```

Expand All @@ -191,7 +191,7 @@ ctx.addEventListener("message", (event) => console.log(event));

**App.ts**
```typescript
import Worker = require("worker-loader!./Worker");
import Worker from "worker-loader!./Worker";

const worker = new Worker();

Expand Down

0 comments on commit 612511d

Please sign in to comment.