If you have multiple files like bellow:
data/stat-weight-unit.ts
export type StatWeightUnit = 'lbs' | 'kg';
data/stat-engine-power-unit.ts
export type StatEnginePowerUnit = 'hp';
data/index.ts
export { StatWeightUnit } from './stat-weight-unit';
export { StatEnginePowerUnit } from './stat-engine-power-unit';
test.ts
import { StatEnginePowerUnit } from './data';
console.log(cast<StatEnginePowerUnit>('kg'));
The serializer will return undefined always, and it will not emit the value, no matter if the serialized value is valid or not.
If you have multiple files like bellow:
The serializer will return
undefinedalways, and it will not emit the value, no matter if the serialized value is valid or not.