JavaScript Babel 编译 ES6 的 class extends Array 时,无法获取方法,求助

dxcqcv · November 20, 2016 · Last by dxcqcv replied at November 22, 2016 · 7109 hits

Built-in classes such as Date, Array, DOM etc cannot be properly subclassed due to limitations in ES5 (for the es2015-classes plugin). You can try to use babel-plugin-transform-builtin-extend based on Object.setPrototypeOf and Reflect.construct, but it also has some limitations. https://babeljs.io/docs/usage/caveats/

You need to Sign in before reply, if you don't have an account, please Sign up first.