Skip to content

Commit 92ea5bb

Browse files
committed
docs(ts): fix typescript definitions
1 parent cdd693c commit 92ea5bb

File tree

80 files changed

+2211
-1755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2211
-1755
lines changed

Documentation/api.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
<%= element.description %>
2121
<% if (element.arguments.length) { %>
2222

23-
| Argument | Type | Description |
24-
| ------------- | ------------- | ----- |<% for (const arg of element.arguments) { %>
25-
| **<%= arg.name %>** | <span class="arg-type"><%= arg.types %></span></br></span><% if (arg.required) { %><span class="arg-required">required</span><% } else { %><span class="arg-optional">optional</span><% } %> | <%= arg.description %> |<% } %><% } %><% if (element.returns.length) { %>
23+
| Argument | Type | Required | Description |
24+
| ------------- | ------------- | ----- | ---------------- |<% for (const arg of element.arguments) { %>
25+
| `<%= arg.name %>` | <%= arg.types %> | <% if (arg.required) { %>Yes<% } else { %>No<% } %> | <%= arg.description %> |<% } %><% } %><% if (element.returns.length) { %>
26+
2627
#### Returns
2728

2829
| Type | Description |
2930
| ----- | ------------- |<% for (const ret of element.returns) { %>
30-
| <span class="arg-type"><%= ret.types %></span> | <%= ret.description %> |<% } %><% } %>
31+
| <%= ret.types %> | <%= ret.description %> |<% } %><% } %>
3132

3233
<% } %>

Sources/Common/Core/Base64/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Convert a Base64 string to an ArrayBuffer.
7-
* @param {string} b64Str
8-
* @returns An ArrayBuffer object.
7+
* @param {string} b64Str
8+
* @return An ArrayBuffer object.
99
*/
1010
export default function toArrayBuffer(b64Str: string): ArrayBuffer;

Sources/Common/Core/CellArray/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export interface vtkCellArray extends VtkDataArray {
1313

1414
/**
1515
* Get the number of cells in the array.
16-
* @param {boolean} [recompute]
16+
* @param {Boolean} [recompute]
1717
*/
1818
getNumberOfCells(recompute?: boolean): number;
1919

2020
/**
2121
*
22-
* @param {boolean} [recompute]
22+
* @param {Boolean} [recompute]
2323
*/
2424
getCellSizes(recompute?: boolean): any;
2525

@@ -47,7 +47,7 @@ export function extend(publicAPI: object, model: object, initialValues?: ICellAr
4747

4848
/**
4949
* Method used to create a new instance of vtkCellArray
50-
* @param initialValues for pre-setting some of its content
50+
* @param {ICellArrayInitialValues} [initialValues] for pre-setting some of its content
5151
*/
5252
export function newInstance(initialValues?: ICellArrayInitialValues): vtkCellArray;
5353

Sources/Common/Core/DataArray/index.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ interface VtkRangeHelper {
3434
* const { min: minMagnitude, max: maxMagnitude } = computeRange(array, -1, 3);
3535
* ```
3636
*
37-
* @param {number[]} values Array to go through to extract the range from
38-
* @param {number} [component] (default: 0) indice to use inside tuple size
39-
* @param {number} [numberOfComponents] (default: 1) size of the tuple
37+
* @param {Number[]} values Array to go through to extract the range from
38+
* @param {Number} [component] (default: 0) indice to use inside tuple size
39+
* @param {Number} [numberOfComponents] (default: 1) size of the tuple
4040
*/
4141
export function computeRange(values: number[], component?: number, numberOfComponents?: number): VtkRange;
4242

@@ -78,7 +78,7 @@ export function extend(publicAPI: object, model: object, initialValues?: object)
7878

7979
/**
8080
* Method use to create a new instance of vtkDataArray
81-
* @param initialValues for pre-setting some of its content
81+
* @param {object} [initialValues] for pre-setting some of its content
8282
*/
8383
export function newInstance(initialValues?: object): VtkDataArray;
8484

0 commit comments

Comments
 (0)