Skip to content

Commit

Permalink
Merge pull request #3507 from microsoft/feature/typescript/use-import…
Browse files Browse the repository at this point in the history
…-type-consistently

Resolve all lint errors related to import type usage in typescript
  • Loading branch information
baywet authored Oct 17, 2023
2 parents d6edd0c + db127bf commit ec42d62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed bug where base64url types would not be generated properly in Java.
- Fixed bug where symbol name cleanup would not work on forward single quotes characters [#3426](https://github.com/microsoft/kiota/issues/3426).
- Fixed a bug where a "models" API path segment in the description would derail generation. [#3400](https://github.com/microsoft/kiota/issues/3400)
- Fix bug where import statements in typescript wasn't using import type notation for types that are erased at runtime. [#3190](https://github.com/microsoft/kiota/issues/3190)

## [1.7.0] - 2023-10-05

Expand Down
4 changes: 4 additions & 0 deletions src/Kiota.Builder/Refiners/TypeScriptRefiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,27 +466,31 @@ private static void CorrectMethodType(CodeMethod currentMethod)
Name = AbstractionsPackageName,
IsExternal = true,
},
IsErasable = true, // the import is used only for the type, not for the value
})},
{"DateOnly", (string.Empty, new CodeUsing {
Name = "DateOnly",
Declaration = new CodeType {
Name = AbstractionsPackageName,
IsExternal = true,
},
IsErasable = true, // the import is used only for the type, not for the value
})},
{"TimeOnly", (string.Empty, new CodeUsing {
Name = "TimeOnly",
Declaration = new CodeType {
Name = AbstractionsPackageName,
IsExternal = true,
},
IsErasable = true, // the import is used only for the type, not for the value
})},
{"Guid", (string.Empty, new CodeUsing {
Name = "Guid",
Declaration = new CodeType {
Name = GuidPackageName,
IsExternal = true,
},
IsErasable = true, // the import is used only for the type, not for the value
})},
};

Expand Down

0 comments on commit ec42d62

Please sign in to comment.