@progress/kendo-typescript-tasks 10.0.21-ng12.59 → 10.0.21-ng12.62

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@progress/kendo-typescript-tasks",
3
3
  "description": "Kendo UI TypeScript package gulp tasks",
4
4
  "main": "gulp-tasks.js",
5
- "version": "10.0.21-ng12.59+6ecedfd",
5
+ "version": "10.0.21-ng12.62+9f7c207",
6
6
  "author": "Telerik",
7
7
  "license": "Apache-2.0",
8
8
  "scripts": {
@@ -18,7 +18,7 @@
18
18
  "typescript": "^4.3.4"
19
19
  },
20
20
  "dependencies": {
21
- "@progress/kendo-common-tasks": "7.9.5-ng12.59+6ecedfd",
21
+ "@progress/kendo-common-tasks": "7.9.5-ng12.62+9f7c207",
22
22
  "@typescript-eslint/eslint-plugin": "4.28.2",
23
23
  "@typescript-eslint/parser": "4.28.2",
24
24
  "core-js": "^3.18.0",
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "6ecedfddda739a6ff44b87570e892da1a5ef56b6"
51
+ "gitHead": "9f7c207c0db3a8464daf0da1c65c7da1da87f851"
52
52
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const getComment = require('./comment');
3
+ const comment = require('./comment');
4
4
  const types = require('./type-utils');
5
5
  const isConstructor = require('./is-constructor');
6
6
  const isEvent = require('./is-event');
@@ -21,7 +21,7 @@ const isProp = (prop) => isPublic(prop) && !isConstructor(prop) && !isMethod(pro
21
21
  const mapProps = (children, parentName) =>
22
22
  children.filter(isProp).map(prop => {
23
23
  let type;
24
- let comment = getComment(prop, parentName);
24
+ let commentProp = prop;
25
25
  if (prop.type) {
26
26
  type = types.typeString(prop);
27
27
  } else if (prop.kindString === 'Accessor') {
@@ -35,7 +35,7 @@ const mapProps = (children, parentName) =>
35
35
  );
36
36
  } else if (prop.kindString === 'Method') {
37
37
  type = types.callType(prop.signatures[0]);
38
- comment = getComment(prop.signatures[0], parentName);
38
+ commentProp = prop.signatures[0];
39
39
  }
40
40
 
41
41
  let name = prop.name;
@@ -55,7 +55,7 @@ const mapProps = (children, parentName) =>
55
55
  name: name,
56
56
  type: type,
57
57
  defaultValue: defaultValue(prop),
58
- comment: comment
58
+ comment: comment(commentProp, parentName)
59
59
  };
60
60
  });
61
61
 
@@ -10,6 +10,9 @@ hbs.registerHelper('capitalize',
10
10
  hbs.registerHelper('contains',
11
11
  (s, chars, options) => (s.includes(chars) ? options.fn(s) : options.inverse(s)));
12
12
 
13
+ hbs.registerHelper('equals',
14
+ (s, comparer, options) => (s === comparer ? options.fn(s) : options.inverse(s)));
15
+
13
16
  const readLocal = (src) =>
14
17
  fs.readFileSync(path.join(__dirname, src), { encoding: 'utf-8' });
15
18
 
@@ -6,7 +6,7 @@
6
6
  `type` {{name}} =
7
7
  {{~#each types~}}
8
8
  {{~#contains this 'slug'}} {{this}}
9
- {{~else contains this 'null'}} `null`
9
+ {{~else equals this '"null"'}} `null`
10
10
  {{~else contains this '"'}} {{this}}
11
11
  {{~else}} `{{this}}`
12
12
  {{~/contains~}}
package/test/api.js CHANGED
@@ -170,6 +170,12 @@ describe('API generation', () => {
170
170
  const page = unionPage(intersectionData);
171
171
  expect(page).toContain('ColumnSortSettings [intersected](https://www.typescriptlang.org/docs/handbook/advanced-types.html#intersection-types) with { mode?: "single" | "multiple"; }');
172
172
  });
173
+
174
+ it('formats values conatining or equaling "null"', () => {
175
+ const unionData = require('./type-union-operators.json');
176
+ const page = unionPage(unionData);
177
+ expect(page).toContain('`type` FilterOperator = "gt" | "gte" | "isnull" | "isnotnull" | `null`');
178
+ });
173
179
  });
174
180
 
175
181
  describe('for components', () => {
@@ -0,0 +1,42 @@
1
+ {
2
+ "id": 416,
3
+ "name": "FilterOperator",
4
+ "kind": 4194304,
5
+ "kindString": "Type alias",
6
+ "flags": {},
7
+ "comment": {
8
+ "shortText": "Represents the FilterOperator type."
9
+ },
10
+ "sources": [
11
+ {
12
+ "fileName": "src/model/filter-expression.ts",
13
+ "line": 5,
14
+ "character": 12
15
+ }
16
+ ],
17
+ "type": {
18
+ "type": "union",
19
+ "types": [
20
+ {
21
+ "type": "literal",
22
+ "value": "gt"
23
+ },
24
+ {
25
+ "type": "literal",
26
+ "value": "gte"
27
+ },
28
+ {
29
+ "type": "literal",
30
+ "value": "isnull"
31
+ },
32
+ {
33
+ "type": "literal",
34
+ "value": "isnotnull"
35
+ },
36
+ {
37
+ "type": "literal",
38
+ "value": null
39
+ }
40
+ ]
41
+ }
42
+ }