Skip to content

Fix @typeChangeFrom bug - #2388

Merged
Travis Prescott (tjprescott) merged 3 commits into
microsoft:mainfrom
tjprescott:fixChangeTypeFrom
Sep 8, 2023
Merged

Travis Prescott (tjprescott) merged 3 commits into
microsoft:mainfrom
tjprescott:fixChangeTypeFrom

Conversation

@tjprescott

Copy link
Copy Markdown
Member

Fix #2341

@github-actions

github-actions Bot commented Sep 8, 2023

Copy link
Copy Markdown
Contributor

Changes in this PR will be published to the following url to try(check status of TypeSpec Pull Request Try It pipeline for publish status):
Playground: https://cadlplayground.z22.web.core.windows.net/prs/2388/

Website: https://cadlwebsite.z1.web.core.windows.net/prs/2388/

Comment thread packages/versioning/test/incompatible-versioning.test.ts Outdated
function validateMultiTypeReference(program: Program, source: Type) {
const versionTypeMap = getVersionedTypeMap(program, source);
if (versionTypeMap === undefined) return;
for (const [version, type] of versionTypeMap!) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (const [version, type] of versionTypeMap!) {
for (const [version, type] of versionTypeMap) {

shouldn't need that as you already check for it above

@tjprescott
Travis Prescott (tjprescott) merged commit 8e22e62 into microsoft:main Sep 8, 2023
@tjprescott
Travis Prescott (tjprescott) deleted the fixChangeTypeFrom branch September 8, 2023 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug in typeChangedFrom

2 participants