@@ -3,7 +3,7 @@ export const takeThisF: <Args extends readonly unknown[], This, Return>(
33) => < AssignedThis extends This > ( self : AssignedThis , ...args : Args ) => Return = Function . prototype . bind . bind (
44 Function . prototype . call ,
55)
6- export const takeThis : < Args extends readonly unknown [ ] , This , Return > (
6+ const takeThis : < Args extends readonly unknown [ ] , This , Return > (
77 f : ( this : This , ...args : Args ) => Return ,
88) => ( self : This , ...args : Args ) => Return = takeThisF
99export const bind : {
@@ -19,18 +19,16 @@ export const bind: {
1919// #region ECMAScript intrinsic
2020// ECMAScript
2121export const { String, Promise, Boolean } = globalThis
22- export const getOwnPropertyDescriptor : < T , K extends keyof T > ( object : T , key : K ) => TypedPropertyDescriptor < T , T [ K ] > =
22+ const getOwnPropertyDescriptor : < T , K extends keyof T > ( object : T , key : K ) => TypedPropertyDescriptor < T , T [ K ] > =
2323 Object . getOwnPropertyDescriptor as any
2424export const setPrototypeOf : < const T extends object > ( o : T , proto : object | null ) => T = Object . setPrototypeOf
2525export const { defineProperty, defineProperties, getOwnPropertyDescriptors, getPrototypeOf, create, freeze } = Object
26- export const { deleteProperty } = Reflect
2726export const apply : < Args extends readonly unknown [ ] , This , Return > (
2827 // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
2928 f : ( ( this : This , ...args : Args ) => Return ) | Function ,
3029 thisArg : This ,
3130 args : Readonly < Args > | IArguments ,
3231) => Return = Reflect . apply as any
33- export const { parse : JSON_parse , stringify : JSON_stringify } = JSON
3432export let hasOwn = Object . hasOwn
3533if ( ! hasOwn ) {
3634 const { hasOwnProperty } = Object . prototype
@@ -40,7 +38,6 @@ export const StringSplit = takeThisF(globalThis.String.prototype.split)<string>
4038export const StringToLowerCase = takeThisF ( globalThis . String . prototype . toLowerCase ) < string >
4139export const StringStartsWith = takeThisF ( globalThis . String . prototype . startsWith ) < string >
4240export const StringEndsWith = takeThisF ( globalThis . String . prototype . endsWith ) < string >
43- export const StringInclude = takeThisF ( globalThis . String . prototype . includes ) < string >
4441export const ArrayFilter = takeThisF ( globalThis . Array . prototype . filter ) < readonly unknown [ ] >
4542export const ArrayIncludes = takeThisF ( globalThis . Array . prototype . includes ) < readonly unknown [ ] >
4643export const ArrayUnshift : < T > ( self : T [ ] , ...args : T [ ] ) => number = takeThisF ( globalThis . Array . prototype . unshift )
@@ -51,9 +48,8 @@ export const Uint8Array_from = globalThis.Uint8Array.from.bind(globalThis.Uint8A
5148// #endregion
5249
5350// #region DOM<EventTarget>
54- export const { URL , Blob, File, DOMException, Event, ClipboardEvent , CustomEvent, InputEvent , EventTarget } = globalThis
51+ export const { URL , Blob, File, DOMException, Event, CustomEvent, EventTarget } = globalThis
5552export const setTimeout = globalThis . setTimeout . bind ( window )
56- export const clearTimeout = globalThis . clearTimeout . bind ( window )
5753export const addEventListener = takeThisF ( EventTarget . prototype . addEventListener ) < EventTarget >
5854export const removeEventListener = takeThisF ( EventTarget . prototype . removeEventListener ) < EventTarget >
5955export const dispatchEvent = takeThisF ( EventTarget . prototype . dispatchEvent )
@@ -115,8 +111,6 @@ export const NodeList_forEach = takeThisF(NodeList.prototype.forEach)<NodeList>
115111// #endregion
116112
117113// #region Firefox magic
118- export const wrapXRayVision : < const T extends object > ( val : T ) => T =
119- typeof XPCNativeWrapper !== 'undefined' ? XPCNativeWrapper : Object
120114export const isFirefox = typeof XPCNativeWrapper !== 'undefined'
121115// #endregion
122116interface TypedPropertyDescriptor < T , V > {
0 commit comments