Skip to content

Commit

Permalink
add builtins assumptions (#2283)
Browse files Browse the repository at this point in the history
* add builtins assumptions

* Update docs/caveats.md

Co-authored-by: Brian Ng <bng412@gmail.com>

Co-authored-by: Brian Ng <bng412@gmail.com>
  • Loading branch information
JLHwung and existentialism committed Aug 4, 2020
1 parent afb8e9f commit 5a17280
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
12 changes: 8 additions & 4 deletions docs/caveats.md
Expand Up @@ -10,14 +10,18 @@ Babel feature requirements by using [@babel/polyfill](polyfill.md).

You may alternatively/selectively include what you need:

| Feature | Requirements |
| --------------------------- | ------------------------------------------------------------------------------------- |
| Feature | Requirements |
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
| Async functions, Generators | [regenerator runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime) |
| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` |
| Spread | `Array.from` |
| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` |
| Spread | `Array.from` |

There is also the `loose` option for some of these plugins.

## Built-ins

Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others), if polyfilled, are modified in a manner that is spec-compliant.

## Classes

Built-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed
Expand Down
12 changes: 8 additions & 4 deletions website/versioned_docs/version-6.26.3/caveats.md
Expand Up @@ -11,14 +11,18 @@ Babel feature requirements by using [babel-polyfill](polyfill.md).

You may alternatively/selectively include what you need:

| Feature | Requirements |
| --------------------------- | ------------------------------------------------------------------------------------- |
| Feature | Requirements |
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
| Async functions, Generators | [regenerator runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime) |
| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` |
| Spread | `Array.from` |
| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` |
| Spread | `Array.from` |

There is also the `loose` option for some of these plugins.

## Built-ins

Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others), if polyfilled, are modified in a manner that is spec-compliant.

## Classes

Built-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed
Expand Down
12 changes: 8 additions & 4 deletions website/versioned_docs/version-7.0.0/caveats.md
Expand Up @@ -11,14 +11,18 @@ Babel feature requirements by using [@babel/polyfill](polyfill.md).

You may alternatively/selectively include what you need:

| Feature | Requirements |
| --------------------------- | ------------------------------------------------------------------------------------- |
| Feature | Requirements |
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
| Async functions, Generators | [regenerator runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime) |
| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` |
| Spread | `Array.from` |
| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` |
| Spread | `Array.from` |

There is also the `loose` option for some of these plugins.

## Built-ins

Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others), if polyfilled, are modified in a manner that is spec-compliant.

## Classes

Built-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed
Expand Down

0 comments on commit 5a17280

Please sign in to comment.