Skip to content

0.65 - February 2025

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]
}
})

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.

  • #4931 Deprecate experimental projection. Projection will be removed in version 0.66
  • #4931 Deprecate versioning projection, switch to the mutator approach
// Step 1: Update to retrieve the mutation instead of projections
const versions = buildVersionProjections(program, service.type);
const versions = getVersioningMutators(program, service.type);
// Step 2: call mutator instead of projection api
const projectedProgram = projectProgram(originalProgram, versionRecord.projections);
const subgraph = unsafe_mutateSubgraphWithNamespace(program, [mutator], service.type);
subgraph.type // this is the mutated service namespace
  • #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 init will not automatically run tsp install if a package.json file 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_useStateMap and unsafe_useStateSet experimental APIs to stable version useStateMap and useStateSet. Old ones are deprecated
  • #5340 Add Experimental Typekit helpers for @typespec/http
  • #5459 add code fixes for incompatible version errors
  • #4931 Provide new mutator based way of getting version snapshot
  • #5685 Updates CollectionWithNextLink to support pagination
  • #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.
  • #5451 Support importing TypeSpec from OpenAPI 3.0 doc
  • #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
  • #5893 Updates tsp-openapi3 to support $ref in requestBodies
  • #5834 Update extension configuration URLs in error message
  • #5752 Disable coloring text when generating code
  • #5754 Add example to the vscode setting “initTemplatesUrls”
  • #5886 refine the quickpick placeholder and the log
  • #5834 Update extension configuration URLs in error message