-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Code
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.Expected behavior:
However, Set and Map can't use with es3 and es5. We need any workaround.
export type Readonly<T> =
T extends ReadonlySet<infer V> ? ReadonlySet<V> :
T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<K, V> :
{ readonly [P in keyof T]: T[P]; };Actual behavior:
type Readonly<T> = {
readonly [P in keyof T]: T[P];
};Playground Link:
Related Issues:
sindresorhuscpplearner
Metadata
Metadata
Assignees
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript