/// <reference types="./node_modules/.pnpm/@vue+language-core@3.2.6/node_modules/@vue/language-core/types/template-helpers.d.ts" />
/// <reference types="./node_modules/.pnpm/@vue+language-core@3.2.6/node_modules/@vue/language-core/types/props-fallback.d.ts" />
import { function ref<T>(value: T): [T] extends [Ref] ? IfAny<T, Ref<T>, T> : Ref<UnwrapRef<T>, UnwrapRef<T> | T> (+1 overload)Takes an inner value and returns a reactive and mutable ref object, which
has a single property `.value` that points to the inner value.ref, const computed: {
<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>;
<T, S = T>(options: WritableComputedOptions<T, S>, debugOptions?: DebuggerOptions): WritableComputedRef<T, S>;
}
computed } from 'vue'
export default {} as typeof __VLS_export;
const __VLS_self = (await import('vue')).function defineComponent<unknown, ComponentObjectPropsOptions<Data>, string, {}, {}, string, {
msg: string;
}, {}, {}, {
greet(): void;
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, {}, string, ComponentProvideOptions, {}, {}, {}, any>(options: {
props?: string[] | (ComponentObjectPropsOptions<Data> & ThisType<void>) | undefined;
__typeProps?: unknown;
__typeEmits?: {} | undefined;
__typeRefs?: {} | undefined;
__typeEl?: any;
} & ComponentOptionsBase<ToResolvedProps<{}, {}>, ... 15 more ..., ComponentProvideOptions> & ThisType<...>): DefineComponent<...> (+2 overloads)
defineComponent({
ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions>.name?: string | undefinedname: 'HelloWorld',
LegacyOptions<ToResolvedProps<{}, {}>, { msg: string; }, {}, { greet(): void; }, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, ComponentProvideOptions>.data?: ((this: CreateComponentPublicInstanceWithMixins<...>, vm: CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, {}, {}, {}, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, ToResolvedProps<{}, {}>, {}, false, {}, {}, {}, {}, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, Readonly<{}> & Readonly<{}>, {}, {}, {}, MethodOptions, {}>) => {
...;
}) | undefined
data() {
return {
msg: stringmsg: 'Hello!'
}
},
LegacyOptions<ToResolvedProps<{}, {}>, { msg: string; }, {}, { greet(): void; }, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, ComponentProvideOptions>.methods?: {
greet(): void;
} | undefined
methods: {
function greet(): voidgreet() {
var console: Consoleconsole.Console.log(...data: any[]): voidThe **`console.log()`** static method outputs a message to the console.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)log(this.msg: stringmsg)
}
}
});
const __VLS_export = await (async () => {
const const count: Ref<number, number>count = ref<number>(value: number): Ref<number, number> (+1 overload)Takes an inner value and returns a reactive and mutable ref object, which
has a single property `.value` that points to the inner value.ref(0)
const const double: ComputedRef<number>double = computed<number>(getter: ComputedGetter<number>, debugOptions?: DebuggerOptions): ComputedRef<number> (+1 overload)Takes a getter function and returns a readonly reactive ref object for the
returned value from the getter. It can also take an object with get and set
functions to create a writable ref object.computed(() => const count: Ref<number, number>count.Ref<number, number>.value: numbervalue * 2)
// @ts-ignore
declare const { const defineProps: {
<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{ [key in PropNames]?: any; }>>;
<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions<Data>>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>;
<TypeProps>(): DefineProps<LooseRequired<TypeProps>, BooleanKey<TypeProps, keyof TypeProps>>;
}
Vue `<script setup>` compiler macro for declaring component props. The
expected argument is the same as the component `props` option.
Example runtime declaration:
```js
// using Array syntax
const props = defineProps(['foo', 'bar'])
// using Object syntax
const props = defineProps({
foo: String,
bar: {
type: Number,
required: true
}
})
```
Equivalent type-based declaration:
```ts
// will be compiled into equivalent runtime declarations
const props = defineProps<{
foo?: string
bar: number
}>()
```defineProps, const defineSlots: <S extends Record<string, any> = Record<string, any>>() => Readonly<S & {}> & SVue `<script setup>` compiler macro for providing type hints to IDEs for
slot name and slot props type checking.
Example usage:
```ts
const slots = defineSlots<{
default(props: { msg: string }): any
}>()
```
This is only usable inside `<script setup>`, is compiled away in the
output and should **not** be actually called at runtime.defineSlots, const defineEmits: {
<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>;
<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>;
<T extends ComponentTypeEmits>(): T extends (...args: any[]) => any ? T : UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: T[K]) => void; }>>;
}
Vue `<script setup>` compiler macro for declaring a component's emitted
events. The expected argument is the same as the component `emits` option.
Example runtime declaration:
```js
const emit = defineEmits(['change', 'update'])
```
Example type-based declaration:
```ts
const emit = defineEmits<{
// <eventName>: <expected arguments>
change: []
update: [value: number] // named tuple syntax
}>()
emit('change')
emit('update', 1)
```
This is only usable inside `<script setup>`, is compiled away in the
output and should **not** be actually called at runtime.defineEmits, const defineExpose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => voidVue `<script setup>` compiler macro for declaring a component's exposed
instance properties when it is accessed by a parent component via template
refs.
`<script setup>` components are closed by default - i.e. variables inside
the `<script setup>` scope is not exposed to parent unless explicitly exposed
via `defineExpose`.
This is only usable inside `<script setup>`, is compiled away in the
output and should **not** be actually called at runtime.defineExpose, const defineModel: {
<T, M extends PropertyKey = string, G = T, S = T>(options: ({
default: any;
} | {
required: true;
}) & PropOptions<T, T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>;
<T, M extends PropertyKey = string, G = T, S = T>(options?: PropOptions<T, T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: ({
default: any;
} | {
required: true;
}) & PropOptions<...> & DefineModelOptions<...>): ModelRef<T, M, G, S>;
<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?: PropOptions<...> & DefineModelOptions<...>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
}
Vue `<script setup>` compiler macro for declaring a
two-way binding prop that can be consumed via `v-model` from the parent
component. This will declare a prop with the same name and a corresponding
`update:propName` event.
If the first argument is a string, it will be used as the prop name;
Otherwise the prop name will default to "modelValue". In both cases, you
can also pass an additional object which will be used as the prop's options.
The returned ref behaves differently depending on whether the parent
provided the corresponding v-model props or not:
- If yes, the returned ref's value will always be in sync with the parent
prop.
- If not, the returned ref will behave like a normal local ref.defineModel, const defineOptions: <RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin>(options?: ComponentOptionsBase<{}, RawBindings, D, C, M, Mixin, Extends, {}> & {
props?: never;
emits?: never;
expose?: never;
slots?: never;
}) => void
Vue `<script setup>` compiler macro for declaring a component's additional
options. This should be used only for options that cannot be expressed via
Composition API - e.g. `inheritAttrs`.defineOptions, const withDefaults: <T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults) => PropsWithDefaults<T, Defaults, BKeys>Vue `<script setup>` compiler macro for providing props default values when
using type-based `defineProps` declaration.
Example usage:
```ts
withDefaults(defineProps<{
size?: number
labels?: string[]
}>(), {
size: 3,
labels: () => ['default label']
})
```
This is only usable inside `<script setup>`, is compiled away in the output
and should **not** be actually called at runtime.withDefaults, }: typeof import('vue');
type __VLS_SetupExposed = import('vue').type ShallowUnwrapRef<T> = T extends ShallowReactiveBrandClass ? T : { [K in keyof T]: DistributeRef<T[K]>; }
export ShallowUnwrapRef
ShallowUnwrapRef<{
count: Ref<number, number>count: typeof const count: Ref<number, number>count;
}>;
const __VLS_ctx = {
...{} as type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : anyObtain the return type of a constructor function typeInstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>,
...{} as __VLS_SetupExposed,
};
type __VLS_LocalComponents = __VLS_SetupExposed;
type __VLS_GlobalComponents = import('vue').GlobalComponents;
let __VLS_components!: __VLS_LocalComponents & __VLS_GlobalComponents;
let __VLS_intrinsics!: import('vue/jsx-runtime').JSX.interface JSX.IntrinsicElementsIntrinsicElements;
type __VLS_LocalDirectives = __VLS_SetupExposed;
let __VLS_directives!: __VLS_LocalDirectives & import('vue').GlobalDirectives;
__VLS_asFunctionalElement1(__VLS_intrinsics.button: ButtonHTMLAttributes & ReservedPropsbutton, __VLS_intrinsics.button: ButtonHTMLAttributes & ReservedPropsbutton)({
...{ onClick?: ((payload: PointerEvent) => void) | undefinedonClick: (...[$event: PointerEvent$event]) => {
__VLS_ctx.count: numbercount++;
// @ts-ignore
[const count: Ref<number, number>count,];
}},
});
( __VLS_ctx.msg: stringmsg );
( __VLS_ctx.count: numbercount );
type __VLS_RootEl =
| __VLS_Elements['button'];
// @ts-ignore
[const count: Ref<number, number>count,msg,];
return (await import('vue')).function defineComponent<unknown, ComponentObjectPropsOptions<Data>, string, {}, {}, string, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, {}, string, ComponentProvideOptions, {}, {}, {}, any>(options: {
props?: string[] | (ComponentObjectPropsOptions<Data> & ThisType<void>) | undefined;
__typeProps?: unknown;
__typeEmits?: {} | undefined;
__typeRefs?: {} | undefined;
__typeEl?: any;
} & ComponentOptionsBase<ToResolvedProps<{}, {}>, ... 15 more ..., ComponentProvideOptions> & ThisType<...>): DefineComponent<...> (+2 overloads)
defineComponent({
});
})();