Typing
All checks were successful
/ Misc Linters (pull_request) Successful in 21s
/ Build App (pull_request) Successful in 1m27s

This commit is contained in:
Valentin Brandl
2024-08-29 10:37:38 +02:00
parent b177a348b7
commit 15de87432b
2 changed files with 7 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
import { safePath, timedExecution } from '$lib';
import safePath, { timedExecution } from '$lib';
import { describe, it, expect } from 'vitest';
describe('safe path', () => {
@@ -32,8 +32,8 @@ describe('safe path', () => {
});
describe('timedExecution', () => {
const asyncIdentity = async (v) => v;
const identity = (v) => v;
const asyncIdentity = async <T>(v: T): Promise<T> => v;
const identity = <T>(v: T): T => v;
it('works with async', async () => {
const { executionTime, result } = await timedExecution(() => asyncIdentity(5));