Skip to content

Fix tsconfig.json: remove lib, add importHelpers and allowSyntheticDefaultImports #32

Description

@daviburg

Context

tsconfig.json violates three Azure SDK TypeScript compiler settings guidelines.

Issues

1. "lib" should not be set

"lib": ["ES2023"]  // ← remove this

Azure SDK guidelines: DO NOT set the lib compiler option. Setting it overrides the TypeScript default and can cause mismatches when the package is consumed in environments targeting a different lib set. TypeScript infers the correct lib from target.

2. Missing "importHelpers": true

"importHelpers": true  // ← add this

Required to use tslib helpers instead of inlining them, reducing bundle size for consumers.

3. Missing "allowSyntheticDefaultImports": true

"allowSyntheticDefaultImports": true  // ← add this

Required for consistent interop with CommonJS modules that lack a default export. Already implied by esModuleInterop: true but should be explicit per guidelines.

Proposed change

-"lib": ["ES2023"],
 "strict": true,
 "esModuleInterop": true,
+"importHelpers": true,
+"allowSyntheticDefaultImports": true,

Add tslib as a dependency: npm install tslib.

Azure SDK guideline

TypeScript compiler configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions