nl_tokens: This function creates a synthetic symbol that combines the value side of one symbol with the type / namespace side of another symbol . Consider this example : declare module graphics { interface Point { x : number ; y : number ; } } declare var graphics : { Point : new ( x : number y : number ) = > graphics . Point ; } declare module graphics { export = graphics ; } An import { Point } from graphics needs to create a symbol that combines the value side Point property with the type / namespace side interface Point .
pl_tokens: function combineValueAndTypeSymbols ( valueSymbol , typeSymbol ) { if ( valueSymbol . flags & ( 793056 /* Type */ | 1536 /* Namespace */ ) ) { return valueSymbol ; } var <mask> = createSymbol ( valueSymbol . flags | typeSymbol . flags , valueSymbol . name ) ; result . declarations = ts . concatenate ( valueSymbol . declarations , typeSymbol . declarations ) ; result . parent = valueSymbol . parent || typeSymbol . parent ; if ( valueSymbol . valueDeclaration ) result . valueDeclaration = valueSymbol . valueDeclaration ; if ( typeSymbol . members ) result . members = typeSymbol . members ; if ( valueSymbol . exports ) result . exports = valueSymbol . exports ; return result ; }