-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Engineering] TypeScript 3.7 migration plan #1441
Comments
There are 16 setters in the SDK. These could potentially cause breaks in application code if is has derived from these classes. As a general statement, it would be very odd code to derive and then set these properties in the The problems around derivation are explained here: The recommendation is to update to the 3.7 compiler and also to set the "useDefineForClassFields": true in the tsconfig. The alternative is to introduce additional steps into our tool chain whereby we generate the .d.ts files via another tool (or previous version of the compiler). This does not seem justified at this stage. Here is an exhaustive list of the properties.
l.27 FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-core\src\botAdapter.ts l.115 FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-core\src\turnContext.ts l.719
FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs\src\dialog.ts l.329 FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs\src\dialog.ts l.344 FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs\src\dialogContainer.ts FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs\src\dialogManager.ts FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs\src\dialogSet.ts FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs-adaptive\src\adaptiveDialog.ts NOTE: FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs-adaptive\src\recognizers\intentPattern.ts FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs-adaptive\src\recognizers\entityRecognizers\regexEntityRecognizer.ts FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs-adaptive-testing\src\adaptiveTestAdapter.ts FIX:
C:\private\v4\botbuilder-js\libraries\botbuilder-dialogs-declarative\src\resources\folderResourceProvider.ts FIX:
C:\private\v4\botbuilder-js\libraries\botframework-connector\src\auth\appCredentials.ts FIX:
|
Just a quick comment on motivation - other than it's nice to be more current :-). We do a lot of porting between languages and the recent additions to TypeScript include optional chaining amongst other things. This would really help in closing the gap between the TypeScript and C# implementations. The risk of breaking changes in people code seems very low. There are always inherent risks with changes, looking through all the occurences of the use of setters, it seems very unlikely that anything would break. |
This a change that we should make at the very beginning of the R11 milestone (note the intention of this change is specifically to benefit the development team working on the SDK - there is customer benefit but it is secondary). Additional detail:
|
Moving to R11. But note this issue should be treated with some priority in the milestone and address at the beginning or not at all. |
I've researched https://github.com/sandersn/downlevel-dts as a suitable approach. It is also used by other MSFT open source projects. |
Versions
What TypeScript version are you using? 3.5.3
TypeScript 3.7 contains breaking changes when compared to 3.5. Our last two minor releases (4.5, 4.6) were shipped with Typescript 3.5.
TypeScript 3.7 has several new features that could help make the team's lives easier, especially for those coming from C# and writing in TypeScript.
If we use the
.d.ts
files from TypeScript 3.7, it contains a breaking change regarding the declaration of get/set accessors in an ambient context.As such, we can explore using different packages to generate
.d.ts
files if we as a dev team want to move to TS 3.7, but keep our current types. One package suggested by @christopheranderson is@microsoft/api-extractor
(GitHub Repo)Additional context: #1436
The text was updated successfully, but these errors were encountered: