autorest.typescript icon indicating copy to clipboard operation
autorest.typescript copied to clipboard

Duplicate identifier appears in modular routes generation

Open v-jiaodi opened this issue 4 months ago • 0 comments

tspconfig.yaml:

emit:
  - "@azure-tools/typespec-ts"
options:
  "@azure-tools/typespec-ts":
    "emitter-output-dir": "{project-root}"
    generateMetadata: true
    generateTest: false
    azureSdkForJs: false
    isTypeSpecTest: true
    isModularLibrary: true
    hierarchyClient: true
    packageDetails:
      name: "@msinternal/routes"

Regarding tspconfig.yaml, I have tried adding enableOperationGroup: true and enableModelNamespace: true, but still got the same error.

Error log:

 Exception during run: test/modularIntegration/generated/routes/src/classic/queryParameters/index.ts(38,3): error TS2300: Duplicate identifier 'queryExpansion'.
test/modularIntegration/generated/routes/src/classic/queryParameters/index.ts(39,3): error TS2300: Duplicate identifier 'queryExpansion'. 
test/modularIntegration/generated/routes/src/classic/queryParameters/index.ts(40,3): error TS2300: Duplicate identifier 'queryContinuation'.
test/modularIntegration/generated/routes/src/classic/queryParameters/index.ts(41,3): error TS2300: Duplicate identifier 'queryContinuation'.
test/modularIntegration/generated/routes/src/classic/queryParameters/index.ts(67,5): error TS1117: An object literal cannot have multiple properties with the same name.
test/modularIntegration/generated/routes/src/classic/queryParameters/index.ts(69,5): error TS1117: An object literal cannot have multiple properties with the same name.

Image

v-jiaodi avatar Oct 18 '24 07:10 v-jiaodi