@progress/kendo-typescript-api-tasks 2.1.1-dev.22 → 2.1.1-dev.24

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/type-utils.js CHANGED
@@ -101,6 +101,10 @@ const singleTypeString = (type) => {
101
101
  return unionTypes({ type }).join(INTERSECTION);
102
102
  }
103
103
 
104
+ if (type.type === 'union') {
105
+ return unionTypes({ type }).join(' | ');
106
+ }
107
+
104
108
  if (type.type === 'reflection') {
105
109
  const decl = type.declaration;
106
110
  if (decl.signatures) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-typescript-api-tasks",
3
3
  "description": "Kendo UI API docs package gulp tasks",
4
- "version": "2.1.1-dev.22+387b9f0",
4
+ "version": "2.1.1-dev.24+e716c7a",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "main": "index.js",
@@ -35,5 +35,5 @@
35
35
  "typescript": "5.2.2",
36
36
  "vitest": "^2.1.8"
37
37
  },
38
- "gitHead": "387b9f0e2987bf344b15a46bdf26b5cff9141f1c"
38
+ "gitHead": "e716c7a9a61d51d61001a77e56053bdecc096bc9"
39
39
  }
package/test/api.js CHANGED
@@ -163,6 +163,12 @@ describe('API generation', () => {
163
163
  const page = unionPage(unionData);
164
164
  expect(page).toContain('`type` FilterOperator = "gt" | "gte" | "isnull" | "isnotnull" | `null`');
165
165
  });
166
+
167
+ it('formats union nested in an interface', () => {
168
+ const unionData = require('./class-with-union-props.json');
169
+ const page = classPage(unionData);
170
+ expect(page).toContain('RefObject<"null" | [SchedulerSlotHandle]({% slug api_scheduler_schedulerslothandle %})>');
171
+ });
166
172
  });
167
173
 
168
174
  describe('for components', () => {
@@ -0,0 +1,99 @@
1
+ {
2
+ "id": 2067,
3
+ "name": "SchedulerSlotsFocusAction",
4
+ "comment": {
5
+ "summary": [
6
+ {
7
+ "kind": "text",
8
+ "text": "Represents the object passed to the "
9
+ },
10
+ {
11
+ "kind": "code",
12
+ "text": "`slots-focus`"
13
+ },
14
+ {
15
+ "kind": "text",
16
+ "text": " reducer."
17
+ }
18
+ ]
19
+ },
20
+ "children": [
21
+ {
22
+ "id": 2069,
23
+ "name": "slot",
24
+ "variant": "declaration",
25
+ "kind": 1024,
26
+ "flags": {},
27
+ "sources": [
28
+ {
29
+ "fileName": "packages/scheduler/src/hooks/use-slots-focus.tsx",
30
+ "line": 25,
31
+ "character": 4,
32
+ "url": "https://github.com/telerik/kendo-react-private/blob/21edd86721/packages/scheduler/src/hooks/use-slots-focus.tsx#L25"
33
+ }
34
+ ],
35
+ "type": {
36
+ "type": "reference",
37
+ "target": {
38
+ "sourceFileName": "../../node_modules/@types/react/index.d.ts",
39
+ "qualifiedName": "React.RefObject"
40
+ },
41
+ "typeArguments": [
42
+ {
43
+ "type": "union",
44
+ "types": [
45
+ {
46
+ "type": "literal",
47
+ "value": null
48
+ },
49
+ {
50
+ "type": "reference",
51
+ "target": 4255,
52
+ "name": "SchedulerSlotHandle",
53
+ "package": "@progress/kendo-react-scheduler",
54
+ "slug": "api_scheduler_schedulerslothandle"
55
+ }
56
+ ]
57
+ }
58
+ ],
59
+ "name": "RefObject",
60
+ "package": "@types/react",
61
+ "qualifiedName": "React.RefObject"
62
+ }
63
+ },
64
+ {
65
+ "id": 2068,
66
+ "name": "type",
67
+ "variant": "declaration",
68
+ "kind": 1024,
69
+ "flags": {},
70
+ "sources": [
71
+ {
72
+ "fileName": "packages/scheduler/src/hooks/use-slots-focus.tsx",
73
+ "line": 24,
74
+ "character": 4,
75
+ "url": "https://github.com/telerik/kendo-react-private/blob/21edd86721/packages/scheduler/src/hooks/use-slots-focus.tsx#L24"
76
+ }
77
+ ],
78
+ "type": {
79
+ "type": "reference",
80
+ "target": 2062,
81
+ "name": "SLOTS_FOCUS_ACTION",
82
+ "package": "@progress/kendo-react-scheduler",
83
+ "slug": "api_scheduler_slots_focus_action"
84
+ }
85
+ }
86
+ ],
87
+ "kind": "interface",
88
+ "packageName": "@progress/kendo-react-scheduler",
89
+ "url": "SchedulerSlotsFocusAction",
90
+ "sources": [
91
+ {
92
+ "fileName": "packages/scheduler/src/hooks/use-slots-focus.tsx",
93
+ "line": 23,
94
+ "character": 17,
95
+ "url": "https://github.com/telerik/kendo-react-private/blob/21edd86721/packages/scheduler/src/hooks/use-slots-focus.tsx#L23"
96
+ }
97
+ ],
98
+ "slug": "api_scheduler_schedulerslotsfocusaction"
99
+ }
@@ -39,4 +39,4 @@
39
39
  }
40
40
  ]
41
41
  }
42
- }
42
+ }