mirror of
https://github.com/denoland/deno.git
synced 2025-07-23 05:05:08 +00:00
BREAKING: Remove Deno.symbols namespace (#4936)
This commit is contained in:
parent
2f0641885c
commit
4041a7b857
19 changed files with 31 additions and 58 deletions
20
cli/js/lib.deno.ns.d.ts
vendored
20
cli/js/lib.deno.ns.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue