0.65 - February 2025
Notables features
Section titled âNotables featuresâConverting Json/JS like object to tsp values is easier
Section titled âConverting Json/JS like object to tsp values is easierâPreviously the quick fix to convert a model expression or tuple to an object/array value would only apply at one level. It is now applied to the entire value allowing for easier conversion of complex objects.
@example({ a: 1, b: 2, c: { d: 3, e: 4, f: [5, 6, 7] }})Will be converted to this with the quick fix:
@example(#{ a: 1, b: 2, c: #{ d: 3, e: 4, f: #[5, 6, 7] }})Additional completion in the tspconfig.yaml
Section titled âAdditional completion in the tspconfig.yamlâIDE support for the tspconfig.yaml was improved adding completion for the extends field, imports, rule, rule sets and variables. The completion items now also show required/optional information in the details of emitterâs options.
Deprecations
Section titled âDeprecationsâ@typespec/compiler
Section titled â@typespec/compilerâ- #4931 Deprecate experimental projection. Projection will be removed in version 0.66
@typespec/versioning
Section titled â@typespec/versioningâ- #4931 Deprecate versioning projection, switch to the mutator approach
// Step 1: Update to retrieve the mutation instead of projectionsconst versions = buildVersionProjections(program, service.type);const versions = getVersioningMutators(program, service.type);
// Step 2: call mutator instead of projection apiconst projectedProgram = projectProgram(originalProgram, versionRecord.projections);const subgraph = unsafe_mutateSubgraphWithNamespace(program, [mutator], service.type);subgraph.type // this is the mutated service namespaceFeatures
Section titled âFeaturesâ@typespec/compiler
Section titled â@typespec/compilerâ- #5572 Add support for ESM subpath imports
- #5790 Add option for semantic walker to visit model derived types
- #5340 Add Experimental Typekit helpers for
@typespec/http - #5716 Updated Rest init template to include additional emitters(client, server) and a basic sample.
- #5186 Support the auto completion for extends, imports, rule, rule sets and variables in tspconfig.yaml
- #5186 Show required/optional information in the details of emitterâs options completion item in tspconfig.yaml
- #5342 Convert model/tuple expression to value code fix is applied to the entire value.
- #5824
tsp initwill not automatically runtsp installif apackage.jsonfile is created. - #4931 [Experimental] Update to subgraph mutator to visit all missing relations
- #5416 Added APIs for getting parameterVisibility and returnTypeVisibility as VisibilityFilter objects.
- #5699 Promote
unsafe_useStateMapandunsafe_useStateSetexperimental APIs to stable versionuseStateMapanduseStateSet. Old ones are deprecated
@typespec/http
Section titled â@typespec/httpâ- #5340 Add Experimental Typekit helpers for
@typespec/http
@typespec/versioning
Section titled â@typespec/versioningâ- #5459 add code fixes for incompatible version errors
- #4931 Provide new mutator based way of getting version snapshot
@typespec/rest
Section titled â@typespec/restâ- #5685 Updates
CollectionWithNextLinkto support pagination
@typespec/openapi3
Section titled â@typespec/openapi3â- #5831 Updates tsp-openapi3 operation response generation to inline expressions and pare down fields with default values. Also adds support for Open API headers and responses $refs.
- #4931 Migrate versioning implementation to use mutator approach.
typespec-vscode
Section titled âtypespec-vscodeâ- #5451 Support importing TypeSpec from OpenAPI 3.0 doc
Bug Fixes
Section titled âBug Fixesâ@typespec/compiler
Section titled â@typespec/compilerâ- #5940 Fix: Infinite loop in language server due to not caching indeterminate entities in templates
- #5186 Fix the issue that extra â will be added when auto completing emitter options inside ""
- #5833 Fix tracing in
SourceLoader
@typespec/openapi3
Section titled â@typespec/openapi3â- #5893 Updates tsp-openapi3 to support $ref in requestBodies
typespec-vs
Section titled âtypespec-vsâ- #5834 Update extension configuration URLs in error message