@typespec/compiler 0.52.0-dev.1 → 0.52.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/manifest.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export default {
2
- "version": "0.52.0-dev.1",
3
- "commit": "9f15ba550211b3ea81828753955d5faa608ab79c"
2
+ "version": "0.52.0-dev.2",
3
+ "commit": "aae7166f0a4a619a8a07f1b15a749fc41e849a6a"
4
4
  };
@@ -69,7 +69,7 @@ extern dec errorsDoc(target: Operation, doc: valueof string);
69
69
  *
70
70
  * ```typespec
71
71
  * #deprecated "Use ActionV2"
72
- * op Action<T>(): T;
72
+ * op Action<Result>(): Result;
73
73
  * ```
74
74
  */
75
75
  #deprecated "@deprecated decorator is deprecated. Use the `#deprecated` directive instead."
@@ -288,8 +288,8 @@ extern dec tag(target: Namespace | Interface | Operation, tag: valueof string);
288
288
  * @example
289
289
  * ```typespec
290
290
  * @friendlyName("{name}List", T)
291
- * model List<T> {
292
- * value: T[];
291
+ * model List<Item> {
292
+ * value: Item[];
293
293
  * nextLink: string;
294
294
  * }
295
295
  * ```
package/lib/lib.tsp CHANGED
@@ -138,18 +138,18 @@ scalar unixTimestamp32 extends utcDateTime;
138
138
  model object {}
139
139
 
140
140
  /**
141
- * @dev Array model type, equivalent to `T[]`
142
- * @template T The type of the array elements
141
+ * @dev Array model type, equivalent to `Element[]`
142
+ * @template Element The type of the array elements
143
143
  */
144
- @indexer(integer, T)
145
- model Array<T> {}
144
+ @indexer(integer, Element)
145
+ model Array<Element> {}
146
146
 
147
147
  /**
148
- * @dev Model with string properties where all the properties have type `T`
149
- * @template T The type of the properties
148
+ * @dev Model with string properties where all the properties have type `Property`
149
+ * @template Element The type of the properties
150
150
  */
151
- @indexer(string, T)
152
- model Record<T> {}
151
+ @indexer(string, Element)
152
+ model Record<Element> {}
153
153
 
154
154
  /**
155
155
  * Represent a URL string as described by https://url.spec.whatwg.org/
@@ -158,51 +158,56 @@ scalar url extends string;
158
158
 
159
159
  /**
160
160
  * Represents a collection of optional properties.
161
- * @template T An object whose spread properties are all optional.
161
+ *
162
+ * @template Source An object whose spread properties are all optional.
162
163
  */
163
164
  @doc("The template for adding optional properties.")
164
165
  @withOptionalProperties
165
- model OptionalProperties<T> {
166
- ...T;
166
+ model OptionalProperties<Source> {
167
+ ...Source;
167
168
  }
168
169
 
169
170
  /**
170
171
  * Represents a collection of updateable properties.
171
- * @template T An object whose spread properties are all updateable.
172
+ *
173
+ * @template Source An object whose spread properties are all updateable.
172
174
  */
173
175
  @doc("The template for adding updateable properties.")
174
176
  @withUpdateableProperties
175
- model UpdateableProperties<T> {
176
- ...T;
177
+ model UpdateableProperties<Source> {
178
+ ...Source;
177
179
  }
178
180
 
179
181
  /**
180
182
  * Represents a collection of omitted properties.
181
- * @template T An object whose properties are spread.
182
- * @template TKeys The property keys to omit.
183
+ *
184
+ * @template Source An object whose properties are spread.
185
+ * @template Keys The property keys to omit.
183
186
  */
184
187
  @doc("The template for omitting properties.")
185
- @withoutOmittedProperties(TKeys)
186
- model OmitProperties<T, TKeys extends string> {
187
- ...T;
188
+ @withoutOmittedProperties(Keys)
189
+ model OmitProperties<Source, Keys extends string> {
190
+ ...Source;
188
191
  }
189
192
 
190
193
  /**
191
194
  * Represents a collection of properties with default values omitted.
192
- * @template T An object whose spread property defaults are all omitted.
195
+ *
196
+ * @template Source An object whose spread property defaults are all omitted.
193
197
  */
194
198
  @withoutDefaultValues
195
- model OmitDefaults<T> {
196
- ...T;
199
+ model OmitDefaults<Source> {
200
+ ...Source;
197
201
  }
198
202
 
199
203
  /**
200
204
  * Applies a visibility setting to a collection of properties.
201
- * @template T An object whose properties are spread.
205
+ *
206
+ * @template Source An object whose properties are spread.
202
207
  * @template Visibility The visibility to apply to all properties.
203
208
  */
204
209
  @doc("The template for setting the default visibility of key properties.")
205
210
  @withDefaultKeyVisibility(Visibility)
206
- model DefaultKeyVisibility<T, Visibility extends valueof string> {
207
- ...T;
211
+ model DefaultKeyVisibility<Source, Visibility extends valueof string> {
212
+ ...Source;
208
213
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/compiler",
3
- "version": "0.52.0-dev.1",
3
+ "version": "0.52.0-dev.2",
4
4
  "description": "TypeSpec Compiler Preview",
5
5
  "author": "Microsoft Corporation",
6
6
  "license": "MIT",