TypeScript 6.0.3 breaks Azure Maps SDK 5.9.3

Doug Marquardt 20 Reputation points
2026-04-22T00:15:45.43+00:00

The latest version of TypeScript won't compile the latest version of Azure Maps SDK.

I contacted the TypeScript team and they said the changes were by design and the Azure Maps SDK would have to updated their TypeScript code.


//index.d.ts
declare namespace atlas {
    //Error happens here. (TS) A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.
    export module data {
    }
}
Azure Maps
Azure Maps

An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.

0 comments No comments

Answer accepted by question author
Anshika Varshney 15,625 Reputation points Microsoft External Staff Moderator
2026-04-25T09:54:00.4133333+00:00

Hi Doug Marquardt,

Thanks for sharing the issue. This is happening because of a change introduced in the latest TypeScript version. As you mentioned, TypeScript 6.x has stricter rules and it no longer allows using the module keyword inside a namespace. That is why the Azure Maps SDK typings are failing to compile.

This is not an issue with your code. It is due to a compatibility mismatch between the TypeScript version and the current Azure Maps SDK version.

Here are a few ways you can handle this:

First option You can temporarily downgrade TypeScript to an earlier stable version like 5.x. This is the simplest workaround until the SDK is updated.

Second option You can manually update the type definition file in your project. In the index.d.ts file, replace the line export module data with export namespace data

This aligns with the new TypeScript rules and avoids the compilation error.

Third option Keep an eye on newer versions of the Azure Maps SDK. Since this behavior is by design in TypeScript, the SDK will need to update its type definitions to be compatible.

Helpful reference: TypeScript namespace changes and stricter rules are documented here https://www.typescriptlang.org/docs/handbook/namespaces.html

In short: This is a TypeScript breaking change, not a runtime issue. You just need to either align your TypeScript version or adjust the typings until the SDK is updated.

I Hope this helps. Do let me know if you have any further queries.

Thankyou!

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.