{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/20454","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/20454/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/20454/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/20454/events","html_url":"https://github.com/Microsoft/TypeScript/issues/20454","id":279146398,"node_id":"MDU6SXNzdWUyNzkxNDYzOTg=","number":20454,"title":"Array of generic functions not assignable to ReadonlyArray","user":{"login":"andy-ms","id":19274678,"node_id":"MDQ6VXNlcjE5Mjc0Njc4","avatar_url":"https://avatars3.githubusercontent.com/u/19274678?v=4","gravatar_id":"","url":"https://api.github.com/users/andy-ms","html_url":"https://github.com/andy-ms","followers_url":"https://api.github.com/users/andy-ms/followers","following_url":"https://api.github.com/users/andy-ms/following{/other_user}","gists_url":"https://api.github.com/users/andy-ms/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-ms/subscriptions","organizations_url":"https://api.github.com/users/andy-ms/orgs","repos_url":"https://api.github.com/users/andy-ms/repos","events_url":"https://api.github.com/users/andy-ms/events{/privacy}","received_events_url":"https://api.github.com/users/andy-ms/received_events","type":"User","site_admin":false},"labels":[{"id":371615233,"node_id":"MDU6TGFiZWwzNzE2MTUyMzM=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Design%20Limitation","name":"Design Limitation","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-04T20:56:30Z","updated_at":"2018-08-01T00:26:39Z","closed_at":"2018-08-01T00:26:39Z","author_association":"CONTRIBUTOR","body":"**TypeScript Version:**  2.7.0-dev.20171203\r\n\r\n**Code**\r\n\r\n```ts\r\ntype Fn<T> = <U extends T>(x: U) => U\r\nfunction f<T, T1 extends T>(fns: Array<Fn<T>>, t1: T1) {\r\n    const a: ReadonlyArray<Fn<T1>> = fns; // This is an error\r\n\r\n    const b: ReadonlyArray<Fn<T>> = fns;\r\n    const c: ReadonlyArray<Fn<T1>> = b; // But this works\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nNo error.\r\n\r\n**Actual behavior:**\r\n\r\n```\r\nsrc/a.ts(3,11): error TS2322: Type 'Fn<T>[]' is not assignable to type 'ReadonlyArray<Fn<T1>>'.\r\n  Types of property 'includes' are incompatible.\r\n    Type '(searchElement: Fn<T>, fromIndex?: number) => boolean' is not assignable to type '(searchElement: Fn<T1>, fromIndex?: number) => boolean'.\r\n      Types of parameters 'searchElement' and 'searchElement' are incompatible.\r\n        Types of parameters 'x' and 'x' are incompatible.\r\n          Type 'U' is not assignable to type 'T1'.\r\n            Type 'T' is not assignable to type 'T1'.\r\n```"}}
{"actor":{"display_login":"typescript-bot"}}