core
core copied to clipboard
types: export `UnwrapRefSimple`, emit typecheck, markRaw/toReadonly return types improvements
Fixes #7278
Note: This has 3 different commit messages:
- types(ref): fix ref<T>() when emitting types
- types(toRaw): fix returning type to Raw<T>
- types(toReadonly): make returning type Readonly
Added a declaration emit step to our types, to prevent regression on #7278.
Noticed the markRaw({} gives an error, the error makes sense but I don't know what should be the fix for it:
import { markRaw } from 'vue'
// error here, because the type is just { [RawSymbol]?: true }
export const a = markRaw({})
export const b = markRaw({
a: 1
})