From 465cf9a6fe2d77f4c3cdaeb8eea60bd2b8697608 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 10 Aug 2021 18:33:08 +1000 Subject: feat: add new esnext types (#11627) --- cli/dts/lib.esnext.d.ts | 2 ++ cli/dts/lib.esnext.error.d.ts | 16 ++++++++++++++++ cli/dts/lib.esnext.object.d.ts | 12 ++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 cli/dts/lib.esnext.error.d.ts create mode 100644 cli/dts/lib.esnext.object.d.ts (limited to 'cli/dts') diff --git a/cli/dts/lib.esnext.d.ts b/cli/dts/lib.esnext.d.ts index a71ac70e6..0e23bff0f 100644 --- a/cli/dts/lib.esnext.d.ts +++ b/cli/dts/lib.esnext.d.ts @@ -20,5 +20,7 @@ and limitations under the License. /// /// +/// /// +/// /// diff --git a/cli/dts/lib.esnext.error.d.ts b/cli/dts/lib.esnext.error.d.ts new file mode 100644 index 000000000..fa06d6f58 --- /dev/null +++ b/cli/dts/lib.esnext.error.d.ts @@ -0,0 +1,16 @@ +// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. + +/// + +interface Error { + cause?: any; +} + +interface ErrorInit { + cause?: any; +} + +interface ErrorConstructor { + new (message?: string, init?: ErrorInit): Error; + (message?: string, init?: ErrorInit): Error; +} diff --git a/cli/dts/lib.esnext.object.d.ts b/cli/dts/lib.esnext.object.d.ts new file mode 100644 index 000000000..4140f9334 --- /dev/null +++ b/cli/dts/lib.esnext.object.d.ts @@ -0,0 +1,12 @@ +// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. + +/// + +interface ObjectConstructor { + /** + * Determines whether an object has a property with the specified name. + * @param o The target object. + * @param v A property name. + */ + hasOwn(o: object, v: PropertyKey): boolean; +} -- cgit v1.2.3