cc7fd2c247
## Changes - Updated dependencies - Migrated to typescript - Removed `div` in favour of Fragment - Replaces `var` with `let` since we don't need global hoisting here ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
6 lines
197 B
TypeScript
6 lines
197 B
TypeScript
// This is a module worker, so we can use imports (in the browser too!)
|
|
import pi from './utils/pi'
|
|
|
|
addEventListener('message', (event: MessageEvent<number>) => {
|
|
postMessage(pi(event.data))
|
|
})
|