Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/pinia/test-dts/mapHelpers.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ expectType<{
}
}>(mapWritableState(useOptionsStore, ['a']))
// @ts-expect-error: only defined in array
mapWritableState(useStore, ['a']).b
mapWritableState(useOptionsStore, ['a']).b

expectType<{
newA: {
Expand All @@ -126,9 +126,9 @@ expectType<{
}>(mapWritableState(useOptionsStore, { newA: 'a' }))

// @ts-expect-error: cannot use a getter
mapWritableState(useStore, ['upper'])
mapWritableState(useOptionsStore, ['upper'])
// @ts-expect-error: cannot use a getter
mapWritableState(useStore, { up: 'upper' })
mapWritableState(useOptionsStore, { up: 'upper' })

const setupStoreWithState = mapState(useSetupStore, ['a'])

Expand Down