Repository: TypeScript
Issue: WebGLShader has no properties
Labels: Bug,Domain: lib.d.ts

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.7.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** `array element type checking`, `error type checking`, `stops checking function argument types`

**Code**
https://github.com/vjancik/dont-find-me-yet/blob/tsc-issue/src/index.ts#L63-L64
- fails to infer a possible Error type
- and if I set it explicitly (see Playground), fails to enforce it in 

https://github.com/vjancik/dont-find-me-yet/blob/tsc-issue/src/index.ts#L146
- `createProgram` doesn't enforce `WebGLShader[]` at all on the first argument, or seemingly any of the other arguments as well. I can add any variable in there and the array accepts it (also Playground)

**Expected behavior:**
Types of fn. arguments on `createProgram` get enforced correctly.
Optional: Return type on `loadShader` & `createProgram` gets inferred correctly as `... | Error`

**Actual behavior:**
The issue doesn't resolve even if I specify all return types on all functions manually.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
[Playground link](http://www.typescriptlang.org/play/?ts=3.8.0-dev.20191214#code/PTAEBkHsGcBdQCoHkAiToCgSNUgXKAJYC2ADgE6QBuApqOTbAK7kB2oVAhgDZN2wBPUjUzZkaAgGEmcSMVA1WTeYOHRQAM0jlQAcXCLlWMOPygMGVXQDKscoVIBRcpXIAeBAD5QAXkQKAD1hFABN1Z1dQAH5QVhpaHQIEAG4LYAAqdIxQdN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AUQvUNYxlFQN9UWrp7ambaP6XolwlbnwKPNKtIGhlUa+scKwJZR8uicoplTCwQJA0aAWXQOCs763WEYIGxyKpQmFNIFaSBQcFbhJNtsPYl0rLUzsnu4txB53lBzmqVyhxWYMA0DLfQvqVRlxZp5dmwSubvQVvzX6KpcRzTaEE3dnNfUHoQ+QTAwt1rkDFtFcDqNzXQaVn1NU-6IO+pTZlUN-5GQKOLn+-8f66N-Pg0e-8bxTQqmsgiCCQKrkgrhYcC4rBL0JIVpR3pXZaGMD4wtATQ0Lj0ZoBod5kDV2PowConGf4-D+V3PuQ84wLxyGvIhTiuVJm5X-JGTgpAOrmRClp46kpNp+FRjVQzYxjNXnattXKOlnOuYjKwE4tmLiBe4DpTYd6hq9BELAaapBSAAEZwsnW4AB8AeSf7SmgM1PIbR4C4ofJ9TiqEcvkmatxRYVJeElafGV0Kn5IBMjGM7FhuX8uFa6J1nY1XODjqdowDghWDoX3-BFtrLsQhqN6wV8gJHJtLzyI4F6RsAAa6CiLTRQKtim2AEhTXG34GzdnDtjZnhTLTF4BupVgMd3k6WpuuxnhcXr-WqRdCW8fbiL1pq6FIo4K0CAts7b26hG7VI7sPdOxcSH0PLuoUsUbE2PRoByDoGXdHpIvG+qIPUJoChGHaB2MIhYixPJEhSqBFFmHb44AkKAaaIQWTy0ILQFkJV1D9EAYs0A7t1BiQY0KWSuJuAaCG-ATlE2nsVPLr20J52AgXzTDVhH4cugACZwkU2lydkLpw+3+KiwibAgERCNHgAwUg2h4CWmIHUeksBFkWLAN9naCW5r8aAoJnswbNKcCjDbvLQ08ZNfCmMmAcNDiycWsEeTl1-yco97HhPQnOKB+D9H1gkzrKlAS0l1LEWdJAA)

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
No, there are multiple problems and I can't pinpoint the cause in a very specific setup.