feat: init
This commit is contained in:
4
node_modules/nuxt/dist/app/compat/capi.d.ts
generated
vendored
Normal file
4
node_modules/nuxt/dist/app/compat/capi.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from 'vue';
|
||||
export declare const install: () => void;
|
||||
export declare function set<T>(target: any, key: string | number | symbol, val: T): T;
|
||||
export declare function del(target: any, key: string | number | symbol): void;
|
||||
19
node_modules/nuxt/dist/app/compat/capi.js
generated
vendored
Normal file
19
node_modules/nuxt/dist/app/compat/capi.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export * from "vue";
|
||||
export const install = () => {
|
||||
};
|
||||
export function set(target, key, val) {
|
||||
if (Array.isArray(target)) {
|
||||
target.length = Math.max(target.length, key);
|
||||
target.splice(key, 1, val);
|
||||
return val;
|
||||
}
|
||||
target[key] = val;
|
||||
return val;
|
||||
}
|
||||
export function del(target, key) {
|
||||
if (Array.isArray(target)) {
|
||||
target.splice(key, 1);
|
||||
return;
|
||||
}
|
||||
delete target[key];
|
||||
}
|
||||
2
node_modules/nuxt/dist/app/compat/idle-callback.d.ts
generated
vendored
Normal file
2
node_modules/nuxt/dist/app/compat/idle-callback.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const requestIdleCallback: Window['requestIdleCallback'];
|
||||
export declare const cancelIdleCallback: Window['cancelIdleCallback'];
|
||||
15
node_modules/nuxt/dist/app/compat/idle-callback.js
generated
vendored
Normal file
15
node_modules/nuxt/dist/app/compat/idle-callback.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export const requestIdleCallback = import.meta.server ? (() => {
|
||||
}) : globalThis.requestIdleCallback || ((cb) => {
|
||||
const start = Date.now();
|
||||
const idleDeadline = {
|
||||
didTimeout: false,
|
||||
timeRemaining: () => Math.max(0, 50 - (Date.now() - start))
|
||||
};
|
||||
return setTimeout(() => {
|
||||
cb(idleDeadline);
|
||||
}, 1);
|
||||
});
|
||||
export const cancelIdleCallback = import.meta.server ? (() => {
|
||||
}) : globalThis.cancelIdleCallback || ((id) => {
|
||||
clearTimeout(id);
|
||||
});
|
||||
1
node_modules/nuxt/dist/app/compat/interval.d.ts
generated
vendored
Normal file
1
node_modules/nuxt/dist/app/compat/interval.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const setInterval: typeof globalThis.setInterval;
|
||||
11
node_modules/nuxt/dist/app/compat/interval.js
generated
vendored
Normal file
11
node_modules/nuxt/dist/app/compat/interval.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { createError } from "../composables/error.js";
|
||||
const intervalError = "[nuxt] `setInterval` should not be used on the server. Consider wrapping it with an `onNuxtReady`, `onBeforeMount` or `onMounted` lifecycle hook, or ensure you only call it in the browser by checking `import.meta.client`.";
|
||||
export const setInterval = import.meta.client ? globalThis.setInterval : (() => {
|
||||
if (import.meta.dev) {
|
||||
throw createError({
|
||||
status: 500,
|
||||
message: intervalError
|
||||
});
|
||||
}
|
||||
console.error(intervalError);
|
||||
});
|
||||
4
node_modules/nuxt/dist/app/compat/vue-demi.d.ts
generated
vendored
Normal file
4
node_modules/nuxt/dist/app/compat/vue-demi.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './capi.js';
|
||||
export declare const Vue2: undefined;
|
||||
export declare const isVue2 = false;
|
||||
export declare const isVue3 = true;
|
||||
4
node_modules/nuxt/dist/app/compat/vue-demi.js
generated
vendored
Normal file
4
node_modules/nuxt/dist/app/compat/vue-demi.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from "./capi.js";
|
||||
export const Vue2 = void 0;
|
||||
export const isVue2 = false;
|
||||
export const isVue3 = true;
|
||||
Reference in New Issue
Block a user