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
{{ message }}
Repository navigation
Remove getSymbolDisplayBuilder from the public API #22195
Along with it's backing code, since we don't use it internally. It has been deprecated since 2.7, and once 2.8 ships it should have a tolerable replacements for all functions in the form of the new node builder methods for the refactored declaration emitter, along with the XToString methods provided in 2.7. I'd target this for either 2.9 or later (3.0?), depending on the timeframe. Our audit of usage (on github) only really showed TS forks and angular depending on it, so this should give them plenty of time to migrate off of it. (ping Martin Probst (@mprobst)Rado Kirov (@rkirov) to remind you that we're going to remove this API)
checker.typeToTypeNode, checker.symbolToEntityName, and checker.symbolToExpression should be more powerful/configurable than checker.typeToString, checker.symbolToString, or checker.getSymbolDisplayBuilder().buildSymbolDisplay were. (You just need to use createPrinter and print the resulting node if you need a string)
Specifically, the TypeFormatFlags.WriteArrayAsGenericType and/or NodeBuilderFlags.WriteArrayAsGenericType flag controls the array format thing. typeToString can actually be configured in that respect, too; so the initial premise that you had to use the symbol display builder may be a bit off.
Activity
rkirov commentedon Feb 27, 2018
Thanks for the heads up!
It's been awhile, but I see we have some comments on why other approaches didn't work for us here - https://github.com/angular/tsickle/blob/d57d40dd049fc074d25efb4b5bca69e2af280a06/src/type-translator.ts#L171
Any comment on using
typeToStringorsymbolToStringas alternative?weswigham commentedon Feb 27, 2018
checker.typeToTypeNode,checker.symbolToEntityName, andchecker.symbolToExpressionshould be more powerful/configurable thanchecker.typeToString,checker.symbolToString, orchecker.getSymbolDisplayBuilder().buildSymbolDisplaywere. (You just need to usecreatePrinterand print the resulting node if you need a string)weswigham commentedon Feb 27, 2018
Specifically, the
TypeFormatFlags.WriteArrayAsGenericTypeand/orNodeBuilderFlags.WriteArrayAsGenericTypeflag controls the array format thing.typeToStringcan actually be configured in that respect, too; so the initial premise that you had to use the symbol display builder may be a bit off.weswigham commentedon Jul 20, 2018
Fixed by #25331