reactivity-test.ts — vue Source File
Architecture documentation for reactivity-test.ts, a typescript file in the vue codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2["reactivity-test.ts"] 09422b63_6947_479f_f3b8_a48790187388["./index"] d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2 --> 09422b63_6947_479f_f3b8_a48790187388 640c5630_c924_297a_b265_64ad36b365b4["utils.ts"] d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2 --> 640c5630_c924_297a_b265_64ad36b365b4 46412727_8fa7_52ec_9420_be74f3b843eb["IsUnion"] d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2 --> 46412727_8fa7_52ec_9420_be74f3b843eb 7d65dad0_e48b_e612_5731_1be8ed27e572["describe"] d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2 --> 7d65dad0_e48b_e612_5731_1be8ed27e572 5f4a7580_a803_7560_b218_8b0cb5a709d8["describe"] d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2 --> 5f4a7580_a803_7560_b218_8b0cb5a709d8 526bbcde_5613_9f1a_1c80_ab1e7061c667["expectType"] d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2 --> 526bbcde_5613_9f1a_1c80_ab1e7061c667 ae6eb6a4_c3be_68e2_81f6_f67b97a4ccd3["expectType"] d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2 --> ae6eb6a4_c3be_68e2_81f6_f67b97a4ccd3 style d1c85536_d8e7_03bd_2b91_8a1f0c0d94a2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {
Ref,
ref,
shallowRef,
isRef,
unref,
reactive,
toRef,
toRefs,
ToRefs,
shallowReactive,
readonly,
markRaw,
shallowReadonly,
set,
del
} from '../../index'
import { IsUnion, describe, expectType } from '../utils'
function plainType(arg: number | Ref<number>) {
// ref coercing
const coerced = ref(arg)
expectType<Ref<number>>(coerced)
// isRef as type guard
if (isRef(arg)) {
expectType<Ref<number>>(arg)
}
// ref unwrapping
expectType<number>(unref(arg))
// ref inner type should be unwrapped
const nestedRef = ref({
foo: ref(1)
})
expectType<{ foo: number }>(nestedRef.value)
// ref boolean
const falseRef = ref(false)
expectType<Ref<boolean>>(falseRef)
expectType<boolean>(falseRef.value)
// ref true
const trueRef = ref<true>(true)
expectType<Ref<true>>(trueRef)
expectType<true>(trueRef.value)
// tuple
expectType<[number, string]>(unref(ref([1, '1'])))
interface IteratorFoo {
[Symbol.iterator]: any
}
// with symbol
expectType<Ref<IteratorFoo | null | undefined>>(
ref<IteratorFoo | null | undefined>()
)
// ... (338 more lines)
Domain
Subdomains
Classes
Dependencies
Source
Frequently Asked Questions
What does reactivity-test.ts do?
reactivity-test.ts is a source file in the vue codebase, written in typescript. It belongs to the CompilerSFC domain, ScriptAnalyzer subdomain.
What functions are defined in reactivity-test.ts?
reactivity-test.ts defines 4 function(s): bailType, plainType, testUnrefGenerics, withSymbol.
What does reactivity-test.ts depend on?
reactivity-test.ts imports 7 module(s): ./index, IsUnion, describe, describe, expectType, expectType, utils.ts.
Where is reactivity-test.ts in the architecture?
reactivity-test.ts is located at types/test/v3/reactivity-test.ts (domain: CompilerSFC, subdomain: ScriptAnalyzer, directory: types/test/v3).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free