| Index: sky/specs/script.md
|
| diff --git a/sky/specs/script.md b/sky/specs/script.md
|
| index e7538eed87470f1be4d2c14bf14b7144351306b9..15c4dba252f571850777b766427bcc25d540d856 100644
|
| --- a/sky/specs/script.md
|
| +++ b/sky/specs/script.md
|
| @@ -6,30 +6,18 @@ The Sky script language is Dart.
|
| The way that Sky integrates the module system with its script language
|
| is described in [modules.md](modules.md).
|
|
|
| -When an method defined as ``external`` receives an argument, it must
|
| -type-check it, and, if the argument's value is the wrong type, then it
|
| -must throw an ArgumentError as follows:
|
| +All the APIs defined in this documentation, unless explicitly called
|
| +out as being in a framework, are in the `dart:sky` built-in module.
|
|
|
| - throw new ArgumentError(value, name: name);
|
| -
|
| -...where "name" is the name of the argument.
|
| -
|
| -Further, if the type of the argument is annotated with ``@nonnull``,
|
| -then the method must additionally throw if the value is of type Null,
|
| -as follows:
|
| -
|
| - throw new ArgumentError.notNull(name);
|
| +When a method in `dart:sky` defined as ``external`` receives an
|
| +argument, it must type-check it, and, if the argument's value is the
|
| +wrong type, then it must throw an ArgumentError as follows:
|
|
|
| -The ``@nonnull`` annotation is defined as follows:
|
| -
|
| -```dart
|
| -const nonnull = const Object();
|
| -```
|
| + throw new ArgumentError(value, name: name);
|
|
|
| -The ``@nonnull`` annotation does nothing in code not marked
|
| -``external``, but it has been included anyway for documentation
|
| -purposes. It indicates places where providing a null is a contract
|
| -violation and that results are therefore likely to be poor.
|
| +...where "name" is the name of the argument. Type checking here
|
| +includes rejecting nulls unless otherwise indicated or unless null is
|
| +argument's default value.
|
|
|
| The following definitions are exposed in ``dart:sky``:
|
|
|
|
|