@azure-tools/typespec-azure-core 0.62.0-dev.3 → 0.62.0-dev.4

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.
@@ -0,0 +1,48 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+
4
+ import "../../dist/src/experimental/tsp-index.js";
5
+
6
+ namespace Azure.Core.Experimental;
7
+
8
+ using Reflection;
9
+
10
+ // #region Mutative Decorators
11
+
12
+ /**
13
+ * Changes the type of a model property to a new type.
14
+ *
15
+ * This can be used in situations where an existing model property type needs to be changed because it cannot be redefined.
16
+ *
17
+ * WARNING: This decorator mutates the model property in place and should be used with EXTREME caution.
18
+ *
19
+ * @param target The model property to change.
20
+ * @param newType The new type to assign to the model property.
21
+ */
22
+ extern dec changePropertyType(target: ModelProperty, newType: Model | Union | Scalar | Enum);
23
+
24
+ /**
25
+ * Copies the properties of `source` that do not already exist on `target` into `target`.
26
+ *
27
+ * This can be used to add a group of properties to an existing model in cases where the model cannot be redefined.
28
+ *
29
+ * WARNING: This decorator mutates the target model in place and should be used with EXTREME caution.
30
+ *
31
+ * @param target The model to copy properties to.
32
+ * @param sourceModel The model to copy properties from.
33
+ */
34
+ extern dec copyProperties(target: Model, sourceModel: Model);
35
+
36
+ /**
37
+ * Copies the variants of `sourceUnion` that do not already exist on `target` into `target`.
38
+ *
39
+ * This can be used to add a group of variants to an existing union in cases where the union cannot be redefined.
40
+ *
41
+ * WARNING: This decorator mutates the target union in place and should be used with EXTREME caution.
42
+ *
43
+ * @param target The union to copy variants to.
44
+ * @param sourceUnion The union to copy variants from.
45
+ */
46
+ extern dec copyVariants(target: Union, sourceUnion: Union);
47
+
48
+ // #endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-core",
3
- "version": "0.62.0-dev.3",
3
+ "version": "0.62.0-dev.4",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Core library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -42,7 +42,7 @@
42
42
  "node": ">=20.0.0"
43
43
  },
44
44
  "files": [
45
- "lib/*.tsp",
45
+ "lib/**/*.tsp",
46
46
  "dist/**",
47
47
  "!dist/test/**"
48
48
  ],