You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classA{staticSTATIC_A: string='A';instanceA: string='A';constructor(){}}classB{staticSTATIC_B: string='B';instanceB: string='B';}// Define a contract to bind an instance type param (T/Z) to its static "parent" (TType/ZType)interfaceConcreteTypeOf<T>extendsFunction{new(...args): T;}// Explicitly say what we are dealing with:classMergeTypes<T,TTypeextendsConcreteTypeOf<T>,Z,ZTypeextendsConcreteTypeOf<Z>>{constructor(privatetype1: TType,privatetype2: ZType){}// We return a constructor for T & Z and intersect static members.merge(): ConcreteTypeOf<T&Z>&TType&ZType{// Do some work to mixin the types.return<any>{};}}letAB=newMergeTypes<A,typeofA,B,typeofB>(A,B).merge();// Inferred AB: ConcreteTypeOf<A & B> & typeof A & typeof Bletab=newAB();// Inferred ab: A & B
hover over AB in new AB().
TypeError: Unable to get property 'flags' of undefined or null reference
at buildSymbolDisplay (:16512:17)
at Anonymous function (:45473:13)
at mapToDisplayParts (:45459:9)
at symbolToDisplayParts (:45472:9)
at getSymbolDisplayPartsDocumentationAndSymbolKind (:51614:41)
at getQuickInfoAtPosition (:51917:13)
at Anonymous function (:55942:119)
at simpleForwardCall (:55793:9)
at forwardJSONCall (:55809:13)
at forwardJSONCall (:55855:13)
at getQuickInfoAtPosition (:55942:13)
The text was updated successfully, but these errors were encountered:
DanielRosenwasser
changed the title
TypeError in getQuicInfoAtPosition for an intersection type
TypeError in getQuickInfoAtPosition for an intersection type
Apr 10, 2016
…example, an intersection type.
(We still need the check for the Anonymous flags or else anonymous function tooltips will look like `var lambdaFoo: (Anonymous function)(a: number, b: number) => number'` instead of `var lambdaFoo: (a: number, b: number) => number`)
Reported in #7934 (comment) by @Arnavion .
hover over
AB
innew AB()
.The text was updated successfully, but these errors were encountered: