jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.07k stars 220 forks source link

TypeScript compile failure at src/core/polyfills.ts #106

Closed timdream closed 9 years ago

timdream commented 9 years ago

Simply checkout the latest master and run npm i && grunt test fails:

Using tsc v1.4.1
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(94,23): error TS2339: Property 'importScripts' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(94,64): error TS2339: Property 'postMessage' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(98,31): error TS2339: Property 'onmessage' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(99,12): error TS2339: Property 'onmessage' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(102,12): error TS2339: Property 'postMessage' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(103,12): error TS2339: Property 'onmessage' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(109,14): error TS2339: Property 'postMessage' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(124,16): error TS2339: Property 'addEventListener' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(125,14): error TS2339: Property 'addEventListener' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(127,14): error TS2339: Property 'attachEvent' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(129,21): error TS2339: Property 'MessageChannel' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(131,30): error TS2339: Property 'MessageChannel' does not exist on type 'Window | Global'.
/Users/timdream/Repositories/BrowserFS/src/core/polyfills.ts(151,14): error TS2339: Property 'document' does not exist on type 'Window | Global'.

Failed on latest node.js and v0.10.18.

Please help. Thanks!

jvilk commented 9 years ago

On mobile atm, but looks like they stripped a lot of things from lib.d.ts that shouldn't have been removed. Will fix tonight.

jvilk commented 9 years ago

It looks like TypeScript split up lib.d.ts into multiple files for 1.5 beta, moving WebWorker-specific interfaces into a WebWorker interface file. I should fix the Gruntfile to use the locally-installed 1.4.

jvilk commented 9 years ago

Hm, nevermind, it's happening with 1.4.1.