mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
perf(nuxt): remove useId from composable key plugin (#30328)
This commit is contained in:
parent
af016ea0d6
commit
201323d22c
@ -146,7 +146,6 @@ export default defineUntypedSchema({
|
|||||||
*/
|
*/
|
||||||
keyedComposables: {
|
keyedComposables: {
|
||||||
$resolve: (val: Array<{ name: string, argumentLength: string }> | undefined) => [
|
$resolve: (val: Array<{ name: string, argumentLength: string }> | undefined) => [
|
||||||
{ name: 'useId', argumentLength: 1 },
|
|
||||||
{ name: 'callOnce', argumentLength: 3 },
|
{ name: 'callOnce', argumentLength: 3 },
|
||||||
{ name: 'defineNuxtComponent', argumentLength: 2 },
|
{ name: 'defineNuxtComponent', argumentLength: 2 },
|
||||||
{ name: 'useState', argumentLength: 2 },
|
{ name: 'useState', argumentLength: 2 },
|
||||||
|
5
test/fixtures/basic-types/types.ts
vendored
5
test/fixtures/basic-types/types.ts
vendored
@ -467,11 +467,6 @@ describe('composables', () => {
|
|||||||
expectTypeOf(useFetch('/test', { default: () => 500 }).data).toEqualTypeOf<Ref<unknown>>()
|
expectTypeOf(useFetch('/test', { default: () => 500 }).data).toEqualTypeOf<Ref<unknown>>()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('prevents passing string to `useId`', () => {
|
|
||||||
// @ts-expect-error providing a key is not allowed
|
|
||||||
useId('test')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('enforces readonly cookies', () => {
|
it('enforces readonly cookies', () => {
|
||||||
// @ts-expect-error readonly cookie
|
// @ts-expect-error readonly cookie
|
||||||
useCookie('test', { readonly: true }).value = 'thing'
|
useCookie('test', { readonly: true }).value = 'thing'
|
||||||
|
Loading…
Reference in New Issue
Block a user