BREAKING: Remove Deno.symbols namespace (#4936)

This commit is contained in:
Nayeem Rahman 2020-04-28 00:06:03 +01:00 committed by GitHub
parent 2f0641885c
commit 4041a7b857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 31 additions and 58 deletions

View file

@ -379,7 +379,7 @@ declare namespace Deno {
*/
export function umask(mask?: number): number;
/** **UNSTABLE**: might move to `Deno.symbols`. */
/** **UNSTABLE**: might be removed in favor of `null` (#3932). */
export const EOF: unique symbol;
export type EOF = typeof EOF;
@ -2338,7 +2338,7 @@ declare namespace Deno {
* class A {
* x = 10;
* y = "hello";
* [Deno.symbols.customInspect](): string {
* [Deno.customInspect](): string {
* return "x=" + this.x + ", y=" + this.y;
* }
* }
@ -2860,16 +2860,8 @@ declare namespace Deno {
windowChange: () => SignalStream;
};
/** **UNSTABLE**: new API. Maybe move `Deno.EOF` here.
*
* Special Deno related symbols. */
export const symbols: {
/** Symbol to access exposed internal Deno API */
readonly internal: unique symbol;
/** A symbol which can be used as a key for a custom method which will be
* called when `Deno.inspect()` is called, or when the object is logged to
* the console. */
readonly customInspect: unique symbol;
// TODO(ry) move EOF here?
};
/** A symbol which can be used as a key for a custom method which will be
* called when `Deno.inspect()` is called, or when the object is logged to
* the console. */
export const customInspect: unique symbol;
}