setup-helpers-test.ts — vue Source File
Architecture documentation for setup-helpers-test.ts, a typescript file in the vue codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f159d3db_db03_c683_09db_791de8346ed7["setup-helpers-test.ts"] 451106ad_39e7_1c30_4a13_bb292ee7299e["./index"] f159d3db_db03_c683_09db_791de8346ed7 --> 451106ad_39e7_1c30_4a13_bb292ee7299e 3bc1859e_5f62_1ad0_1a20_c1ba96d0683f["utils.ts"] f159d3db_db03_c683_09db_791de8346ed7 --> 3bc1859e_5f62_1ad0_1a20_c1ba96d0683f 46bce54a_6904_14ab_386b_534c5c7fffd4["describe"] f159d3db_db03_c683_09db_791de8346ed7 --> 46bce54a_6904_14ab_386b_534c5c7fffd4 0d1d7fa8_6c23_89bd_a93c_da22952bfee8["describe"] f159d3db_db03_c683_09db_791de8346ed7 --> 0d1d7fa8_6c23_89bd_a93c_da22952bfee8 620797b4_7e39_eef5_c1bc_e0f39399ca9d["expectType"] f159d3db_db03_c683_09db_791de8346ed7 --> 620797b4_7e39_eef5_c1bc_e0f39399ca9d 2d9e76a6_6850_37a3_10b2_3172dcc30bcd["expectType"] f159d3db_db03_c683_09db_791de8346ed7 --> 2d9e76a6_6850_37a3_10b2_3172dcc30bcd style f159d3db_db03_c683_09db_791de8346ed7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { useAttrs, useSlots, SetupContext } from '../index'
import { describe, expectType } from './utils'
describe('defineProps w/ type declaration', () => {
// type declaration
const props = defineProps<{
foo: string
}>()
// explicitly declared type should be refined
expectType<string>(props.foo)
// @ts-expect-error
props.bar
})
describe('defineProps w/ type declaration + withDefaults', () => {
const res = withDefaults(
defineProps<{
number?: number
arr?: string[]
obj?: { x: number }
fn?: (e: string) => void
genStr?: string
x?: string
y?: string
z?: string
}>(),
{
number: 123,
arr: () => [],
obj: () => ({ x: 123 }),
fn: () => {},
genStr: () => '',
y: undefined,
z: 'string'
}
)
res.number + 1
res.arr.push('hi')
res.obj.x
res.fn('hi')
res.genStr.slice()
// @ts-expect-error
res.x.slice()
// @ts-expect-error
res.y.slice()
expectType<string | undefined>(res.x)
expectType<string | undefined>(res.y)
expectType<string>(res.z)
})
describe('defineProps w/ union type declaration + withDefaults', () => {
withDefaults(
defineProps<{
union1?: number | number[] | { x: number }
union2?: number | number[] | { x: number }
union3?: number | number[] | { x: number }
union4?: number | number[] | { x: number }
}>(),
// ... (85 more lines)
Domain
Types
Dependencies
Source
Frequently Asked Questions
What does setup-helpers-test.ts do?
setup-helpers-test.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain.
What does setup-helpers-test.ts depend on?
setup-helpers-test.ts imports 6 module(s): ./index, describe, describe, expectType, expectType, utils.ts.
Where is setup-helpers-test.ts in the architecture?
setup-helpers-test.ts is located at types/test/setup-helpers-test.ts (domain: VueCore, directory: types/test).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free