I want to combine both having a type for a constant, and using it "as const" to get the literal types as the type:
type MyType = {name: string};
const x:MyType = {
name: 'test' // Autocompleted, typesafe. But Type is {name: string}, not
// what I want, {name: 'test'}
}
const x = { name: 'test' } as const; // Gives correct type, but no type check...
How to do this?