Skip to content

Commit fb02b90

Browse files
committed
chore: lint
1 parent 9905a72 commit fb02b90

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/base.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
export const assert = (condition: boolean, message: string): asserts condition => {
1+
export function assert(condition: boolean, message: string): asserts condition {
22
if (!condition)
33
throw new Error(message)
44
}
55
export const toString = (v: any) => Object.prototype.toString.call(v)
6-
export const getTypeName = (v: any) => {
6+
export function getTypeName(v: any) {
77
if (v === null)
88
return 'null'
99
const type = toString(v).slice(8, -1).toLowerCase()
10-
return typeof v === 'object' || typeof v === 'function' ? type : typeof v
10+
return (typeof v === 'object' || typeof v === 'function') ? type : typeof v
1111
}
12-
export const noop = () => {}
12+
export function noop() {}

src/promise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function createSingletonPromise<T>(fn: () => Promise<T>): SingletonPromis
4040
*/
4141
export function sleep(ms: number, callback?: Fn<any>) {
4242
return new Promise<void>(resolve =>
43-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
43+
4444
setTimeout(async () => {
4545
await callback?.()
4646
resolve()

0 commit comments

Comments
 (0)