@typespec/versioning 0.44.0-dev.4 → 0.44.0-dev.5
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/lib/decorators.tsp +13 -0
- package/package.json +1 -1
package/lib/decorators.tsp
CHANGED
|
@@ -6,56 +6,69 @@ namespace TypeSpec {
|
|
|
6
6
|
namespace Versioning {
|
|
7
7
|
/**
|
|
8
8
|
* Identifies that the decorated namespace is versioned by the provided enum.
|
|
9
|
+
* @param versions The enum that describes the supported versions.
|
|
9
10
|
*/
|
|
10
11
|
extern dec versioned(target: Namespace, versions: Enum);
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Identifies that a namespace or a given versioning enum member relies upon a versioned package.
|
|
15
|
+
* @param versionRecords The dependent library version(s) for the target namespace or version.
|
|
14
16
|
*/
|
|
15
17
|
extern dec useDependency(target: EnumMember | Namespace, ...versionRecords: EnumMember[]);
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* Identifies when the target was added.
|
|
21
|
+
* @param version The version that the target was added in.
|
|
19
22
|
*/
|
|
20
23
|
extern dec added(target: unknown, version: EnumMember);
|
|
21
24
|
|
|
22
25
|
/**
|
|
23
26
|
* Identifies when the target was removed.
|
|
27
|
+
* @param version The version that the target was removed in.
|
|
24
28
|
*/
|
|
25
29
|
extern dec removed(target: unknown, version: EnumMember);
|
|
26
30
|
|
|
27
31
|
/**
|
|
28
32
|
* Identifies when the target has been renamed.
|
|
33
|
+
* @param version The version that the target was renamed in.
|
|
34
|
+
* @param oldName The previous name of the target.
|
|
29
35
|
*/
|
|
30
36
|
extern dec renamedFrom(target: unknown, version: EnumMember, oldName: string);
|
|
31
37
|
|
|
32
38
|
/**
|
|
33
39
|
* Identifies when a target was made optional.
|
|
40
|
+
* @param version The version that the target was made optional in.
|
|
34
41
|
*/
|
|
35
42
|
extern dec madeOptional(target: unknown, version: EnumMember);
|
|
36
43
|
|
|
37
44
|
/**
|
|
38
45
|
* Identifies when the target type changed.
|
|
46
|
+
* @param version The version that the target type changed in.
|
|
47
|
+
* @param oldType The previous type of the target.
|
|
39
48
|
*/
|
|
40
49
|
extern dec typeChangedFrom(target: unknown, version: EnumMember, oldType: unknown);
|
|
41
50
|
|
|
42
51
|
/**
|
|
43
52
|
* Returns whether the target exists for the given version.
|
|
53
|
+
* @param version The version to check.
|
|
44
54
|
*/
|
|
45
55
|
extern fn existsAtVersion(target: unknown, version: EnumMember): boolean;
|
|
46
56
|
|
|
47
57
|
/**
|
|
48
58
|
* Returns whether the target has a different name for the given version.
|
|
59
|
+
* @param version The version to check.
|
|
49
60
|
*/
|
|
50
61
|
extern fn hasDifferentNameAtVersion(target: unknown, version: EnumMember): boolean;
|
|
51
62
|
|
|
52
63
|
/**
|
|
53
64
|
* Returns whether the target was made optional after the given version.
|
|
65
|
+
* @param version The version to check.
|
|
54
66
|
*/
|
|
55
67
|
extern fn madeOptionalAfter(target: unknown, version: EnumMember): boolean;
|
|
56
68
|
|
|
57
69
|
/**
|
|
58
70
|
* Returns whether the version exists for the provided enum member.
|
|
71
|
+
* @param version The version to check.
|
|
59
72
|
*/
|
|
60
73
|
extern fn getVersionForEnumMember(target: unknown, version: EnumMember): boolean;
|
|
61
74
|
}
|
package/package.json
CHANGED