/* Intro: Our attempt to Open Source didn't work quite as expected. It turned out there were already many existing functional JS libraries. All the remaining developers left the company as well. It seems that they are joining a very ambitious startup which re-invented a juicer and raised millions of dollars. Too bad we cannot compete with this kind of financing even though we believe our idea is great. It's time to shine for the last time and publish our new invention: object-constructor as our CTO named it. A small library which helps manipulating an object. Exercise: Here is a library which helps manipulating objects. We tried to write type annotations and we failed. Please help! */
index.ts(32,17): error TS7006: Parameter 'obj' implicitly has an 'any'type. index.ts(34,16): error TS7006: Parameter 'key' implicitly has an 'any'type. index.ts(34,21): error TS7006: Parameter 'value' implicitly has an 'any'type. index.ts(38,16): error TS7006: Parameter 'key' implicitly has an 'any'type. index.ts(42,19): error TS7006: Parameter 'key' implicitly has an 'any'type. test.ts(9,12): error TS2344: Type 'false' does not satisfy the constraint 'true'. test.ts(19,12): error TS2344: Type 'false' does not satisfy the constraint 'true'. test.ts(27,12): error TS2344: Type 'false' does not satisfy the constraint 'true'. test.ts(33,12): error TS2344: Type 'false' does not satisfy the constraint 'true'.
/* Intro: Our attempt to Open Source didn't work quite as expected. It turned out there were already many existing functional JS libraries. All the remaining developers left the company as well. It seems that they are joining a very ambitious startup which re-invented a juicer and raised millions of dollars. Too bad we cannot compete with this kind of financing even though we believe our idea is great. It's time to shine for the last time and publish our new invention: object-constructor as our CTO named it. A small library which helps manipulating an object. Exercise: Here is a library which helps manipulating objects. We tried to write type annotations and we failed. Please help! */
typeObjectWithNewProp<T, K extendsstring, V> = T & {[NKin K]: V};