Closed
Description
openedon Mar 16, 2020
TypeScript Version: 3.7.2
Search Terms:
namespace, typing
Code
type Nullable<T> = T | null
export namespace ProfileFields {
type name = string;
type WHYYY = string | null;
type id = string | null;
// export type WHYYY = Nullable<string>;
// export type id = Nullable<string>;
}
export interface Profile {
name: ProfileFields.name;
WHYYY: ProfileFields.WHYYY;
id: ProfileFields.id;
}
export type General = Pick<Profile, 'WHYYY' | 'name' | 'id'>
Expected behavior:
type General = {
WHYYY: ProfileFields.WHHYY
name: ProfileFields.name
id: ProfileFields.id
}
Actual behavior:
type General = {
WHYYY: ProfileFields.WHHYY
name: ProfileFields.name
id: ProfileFields.WHHYY
}
Playground Link: Provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment