the following is seen in typescript@3.4.0-dev.20190131:
declarefunctiononlyNullablePlease<Textends(nullextendsT ? any : never)>(value: T): void;declarevarz: string|null;onlyNullablePlease(z);// works as expecteddeclarevary: string;onlyNullablePlease(y);// error as expectedfunctionf<T>(t: T){varx: T|null=Math.random()>0.5 ? null : t;onlyNullablePlease(x);// should work, unexpected error:/*Argument of type 'T | null' is not assignable to parameter of type 'null extends T | null ? any : never'. Type 'null' is not assignable to type 'null extends T | null ? any : never'.ts(2345) */}
the following is seen in typescript@3.4.0-dev.20190131: