Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
523 B
14 lines
523 B
import { expectType } from 'tsd'
|
|
import { open, RootDatabase } from '../..'
|
|
|
|
const path = 'type-test-store'
|
|
|
|
expectType<RootDatabase>(open(path, { compression: true }))
|
|
expectType<RootDatabase>(open({ path, compression: true }))
|
|
|
|
const defaultStore = open({ path, compression: true })
|
|
expectType<boolean>(await defaultStore.put('foo', { bar: 'baz' }))
|
|
expectType<any>(defaultStore.get('foo'))
|
|
|
|
const typedStore = open<string>({ path, compression: true })
|
|
expectType<string | undefined>(typedStore.get('foo'))
|
|
|