[relay-runtime]: allow readonly array elements to be inferred in RecordProxy (#43187)

* fix(unarray): infer elements of ReadonlyArray

* fix(dtslint): remove unsupported tags
This commit is contained in:
Luiz Victor Linhares Rocha 2020-03-18 07:31:06 -03:00 committed by GitHub
parent eb3ba1e77e
commit 8770afcbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View File

@ -200,16 +200,10 @@ export { deepFreeze } from './lib/util/deepFreeze';
* relay-compiler-language-typescript support for fragment references
*/
/**
* @private
*/
export interface _RefType<Ref extends string> {
' $refType': Ref;
}
/**
* @private
*/
export interface _FragmentRefs<Refs extends string> {
' $fragmentRefs': FragmentRefs<Refs>;
}

View File

@ -305,7 +305,7 @@ export type Scheduler = (callback: () => void) => void;
* allowing different implementations that may e.g. create a changeset of
* the modifications.
*/
export type Unarray<T> = T extends Array<infer U> ? U : T;
export type Unarray<T> = T extends Array<infer U> | ReadonlyArray<infer U> ? U : T;
export type Primitive = string | number | boolean | null | undefined;
export interface RecordProxy<T = {}> {