diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2020-07-14 15:24:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 15:24:17 -0400 |
commit | cde4dbb35132848ffece59ef9cfaccff32347124 (patch) | |
tree | cc7830968c6decde704c8cfb83c9185193dc698f /cli/js/web/util.ts | |
parent | 9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff) |
Use dprint for internal formatting (#6682)
Diffstat (limited to 'cli/js/web/util.ts')
-rw-r--r-- | cli/js/web/util.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cli/js/web/util.ts b/cli/js/web/util.ts index 281048cd8..3165c37a7 100644 --- a/cli/js/web/util.ts +++ b/cli/js/web/util.ts @@ -27,7 +27,7 @@ export function isInvalidDate(x: Date): boolean { export function requiredArguments( name: string, length: number, - required: number + required: number, ): void { if (length < required) { const errMsg = `${name} requires at least ${required} argument${ @@ -43,7 +43,7 @@ export function immutableDefine( o: any, p: string | number | symbol, // eslint-disable-next-line @typescript-eslint/no-explicit-any - value: any + value: any, ): void { Object.defineProperty(o, p, { value, @@ -64,7 +64,7 @@ export function hasOwnProperty(obj: unknown, v: PropertyKey): boolean { * * @internal */ export function isIterable<T, P extends keyof T, K extends T[P]>( - o: T + o: T, ): o is T & Iterable<[P, K]> { // checks for null and undefined if (o == null) { @@ -81,12 +81,12 @@ function cloneArrayBuffer( srcBuffer: ArrayBufferLike, srcByteOffset: number, srcLength: number, - cloneConstructor: ArrayBufferConstructor | SharedArrayBufferConstructor + cloneConstructor: ArrayBufferConstructor | SharedArrayBufferConstructor, ): InstanceType<typeof cloneConstructor> { // this function fudges the return type but SharedArrayBuffer is disabled for a while anyway return srcBuffer.slice( srcByteOffset, - srcByteOffset + srcLength + srcByteOffset + srcLength, ) as InstanceType<typeof cloneConstructor>; } @@ -122,7 +122,7 @@ export function cloneValue(value: any): any { value, 0, value.byteLength, - ArrayBuffer + ArrayBuffer, ); objectCloneMemo.set(value, cloned); return cloned; @@ -142,7 +142,7 @@ export function cloneValue(value: any): any { return new (value.constructor as DataViewConstructor)( clonedBuffer, value.byteOffset, - length + length, ); } if (value instanceof Map) { @@ -183,7 +183,7 @@ interface GenericConstructor<T = any> { * are not. */ export function defineEnumerableProps( Ctor: GenericConstructor, - props: string[] + props: string[], ): void { for (const prop of props) { Reflect.defineProperty(Ctor.prototype, prop, { enumerable: true }); |