Docs: adding first version of the auto-generated packages API docs. (#22107)

* trying out api-extractor.

* works with our setup of build.

* wip.

* changed the packages so it works better with the api-extractor.

* Changes to make the api-extractor to work.

* cleaned up the api-extractor config files.

* added some more documentation.

* added tsdoc-metadata to gitignore.

* removed the generated docs (will do that in another PR).

* added execute permission to script for generating dosc.

* added so we will push generated docs to branch.

* will clean packages_api on abort.

* Fixed failing tests.

* fixed formatting issue with typedoc comment.

* temporarily disabled tslint rules about namespace until https://github.com/microsoft/rushstack/issues/1029 is resolved

* temporary enabled bable namespaces.

* updated build script.

* updated script.

* updated script with some colors.

* changed to camelCase.

* removed spacing.

* Starting to add documentation guidelines.

* added examples headline.

* added menu options.

* added parameters and return values.

* Fixed merge error.

* Added first version of auto-generated docs.

* changed so we use the eslint ignore syntax.

* changed to correct eslint ingnore comment.

* fixed some spelling errors reported by codespell.

* added script to generate docs in current folder.

* updated api docs.

* lerna bootstrap.

* added eror to the ingore words list.

* removed file that should be ignored.

* updated locKFILE.

* referenced the code comments guidelines.

* updated packages.

* updated deps.

* updated the autogenerated dosc.

* adding missing new line.
This commit is contained in:
Marcus Andersson
2020-02-26 10:03:53 +01:00
committed by GitHub
parent 89e6c45090
commit 6bc369629d
594 changed files with 30265 additions and 1 deletions
@@ -0,0 +1,35 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "describeTextRange"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
draft = true
+++
## rangeUtil.describeTextRange() function
### rangeUtil.describeTextRange() function
<b>Signature</b>
```typescript
function describeTextRange(expr: any): any;
```
<b>Import</b>
```typescript
import { rangeUtil } from '@grafana/data';
const { describeTextRange } = rangeUtil;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| expr | <code>any</code> | |
<b>Returns:</b>
`any`
@@ -0,0 +1,856 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getRelativeTimesList"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
draft = true
+++
## rangeUtil.getRelativeTimesList() function
### rangeUtil.getRelativeTimesList() function
<b>Signature</b>
```typescript
function getRelativeTimesList(timepickerSettings: any, currentDisplay: any): import("lodash").Dictionary<(number | {
from: string;
to: string;
display: string;
section: number;
} | (() => string) | (() => string) | (() => {
from: string;
to: string;
display: string;
section: number;
} | undefined) | ((...items: {
from: string;
to: string;
display: string;
section: number;
}[]) => number) | {
(...items: ConcatArray<{
from: string;
to: string;
display: string;
section: number;
}>[]): {
from: string;
to: string;
display: string;
section: number;
}[];
(...items: ({
from: string;
to: string;
display: string;
section: number;
} | ConcatArray<{
from: string;
to: string;
display: string;
section: number;
}>)[]): {
from: string;
to: string;
display: string;
section: number;
}[];
} | ((separator?: string | undefined) => string) | (() => {
from: string;
to: string;
display: string;
section: number;
}[]) | (() => {
from: string;
to: string;
display: string;
section: number;
} | undefined) | ((start?: number | undefined, end?: number | undefined) => {
from: string;
to: string;
display: string;
section: number;
}[]) | ((compareFn?: ((a: {
from: string;
to: string;
display: string;
section: number;
}, b: {
from: string;
to: string;
display: string;
section: number;
}) => number) | undefined) => {
from: string;
to: string;
display: string;
section: number;
}[]) | {
(start: number, deleteCount?: number | undefined): {
from: string;
to: string;
display: string;
section: number;
}[];
(start: number, deleteCount: number, ...items: {
from: string;
to: string;
display: string;
section: number;
}[]): {
from: string;
to: string;
display: string;
section: number;
}[];
} | ((...items: {
from: string;
to: string;
display: string;
section: number;
}[]) => number) | ((searchElement: {
from: string;
to: string;
display: string;
section: number;
}, fromIndex?: number | undefined) => number) | ((searchElement: {
from: string;
to: string;
display: string;
section: number;
}, fromIndex?: number | undefined) => number) | ((callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any) => boolean) | ((callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any) => boolean) | ((callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => void, thisArg?: any) => void) | (<U>(callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => U, thisArg?: any) => U[]) | {
<S extends {
from: string;
to: string;
display: string;
section: number;
}>(callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => value is S, thisArg?: any): S[];
(callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any): {
from: string;
to: string;
display: string;
section: number;
}[];
} | {
(callbackfn: (previousValue: {
from: string;
to: string;
display: string;
section: number;
}, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => {
from: string;
to: string;
display: string;
section: number;
}): {
from: string;
to: string;
display: string;
section: number;
};
(callbackfn: (previousValue: {
from: string;
to: string;
display: string;
section: number;
}, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => {
from: string;
to: string;
display: string;
section: number;
}, initialValue: {
from: string;
to: string;
display: string;
section: number;
}): {
from: string;
to: string;
display: string;
section: number;
};
<U_1>(callbackfn: (previousValue: U_1, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => U_1, initialValue: U_1): U_1;
} | {
(callbackfn: (previousValue: {
from: string;
to: string;
display: string;
section: number;
}, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => {
from: string;
to: string;
display: string;
section: number;
}): {
from: string;
to: string;
display: string;
section: number;
};
(callbackfn: (previousValue: {
from: string;
to: string;
display: string;
section: number;
}, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => {
from: string;
to: string;
display: string;
section: number;
}, initialValue: {
from: string;
to: string;
display: string;
section: number;
}): {
from: string;
to: string;
display: string;
section: number;
};
<U_2>(callbackfn: (previousValue: U_2, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => U_2, initialValue: U_2): U_2;
} | {
<S_1 extends {
from: string;
to: string;
display: string;
section: number;
}>(predicate: (this: void, value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, obj: {
from: string;
to: string;
display: string;
section: number;
}[]) => value is S_1, thisArg?: any): S_1 | undefined;
(predicate: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, obj: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any): {
from: string;
to: string;
display: string;
section: number;
} | undefined;
} | ((predicate: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, obj: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any) => number) | ((value: {
from: string;
to: string;
display: string;
section: number;
}, start?: number | undefined, end?: number | undefined) => {
from: string;
to: string;
display: string;
section: number;
}[]) | ((target: number, start: number, end?: number | undefined) => {
from: string;
to: string;
display: string;
section: number;
}[]) | (() => IterableIterator<[number, {
from: string;
to: string;
display: string;
section: number;
}]>) | (() => IterableIterator<number>) | (() => IterableIterator<{
from: string;
to: string;
display: string;
section: number;
}>) | ((searchElement: {
from: string;
to: string;
display: string;
section: number;
}, fromIndex?: number | undefined) => boolean) | (<U_3, This = undefined>(callback: (this: This, value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | {
<U_4>(this: U_4[][][][][][][][], depth: 7): U_4[];
<U_5>(this: U_5[][][][][][][], depth: 6): U_5[];
<U_6>(this: U_6[][][][][][], depth: 5): U_6[];
<U_7>(this: U_7[][][][][], depth: 4): U_7[];
<U_8>(this: U_8[][][][], depth: 3): U_8[];
<U_9>(this: U_9[][][], depth: 2): U_9[];
<U_10>(this: U_10[][], depth?: 1 | undefined): U_10[];
<U_11>(this: U_11[], depth: 0): U_11[];
<U_12>(depth?: number | undefined): any[];
})[]>;
```
<b>Import</b>
```typescript
import { rangeUtil } from '@grafana/data';
const { getRelativeTimesList } = rangeUtil;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| timepickerSettings | <code>any</code> | |
| currentDisplay | <code>any</code> | |
<b>Returns:</b>
`import("lodash").Dictionary<(number | {
from: string;
to: string;
display: string;
section: number;
} | (() => string) | (() => string) | (() => {
from: string;
to: string;
display: string;
section: number;
} | undefined) | ((...items: {
from: string;
to: string;
display: string;
section: number;
}[]) => number) | {
(...items: ConcatArray<{
from: string;
to: string;
display: string;
section: number;
}>[]): {
from: string;
to: string;
display: string;
section: number;
}[];
(...items: ({
from: string;
to: string;
display: string;
section: number;
} | ConcatArray<{
from: string;
to: string;
display: string;
section: number;
}>)[]): {
from: string;
to: string;
display: string;
section: number;
}[];
} | ((separator?: string | undefined) => string) | (() => {
from: string;
to: string;
display: string;
section: number;
}[]) | (() => {
from: string;
to: string;
display: string;
section: number;
} | undefined) | ((start?: number | undefined, end?: number | undefined) => {
from: string;
to: string;
display: string;
section: number;
}[]) | ((compareFn?: ((a: {
from: string;
to: string;
display: string;
section: number;
}, b: {
from: string;
to: string;
display: string;
section: number;
}) => number) | undefined) => {
from: string;
to: string;
display: string;
section: number;
}[]) | {
(start: number, deleteCount?: number | undefined): {
from: string;
to: string;
display: string;
section: number;
}[];
(start: number, deleteCount: number, ...items: {
from: string;
to: string;
display: string;
section: number;
}[]): {
from: string;
to: string;
display: string;
section: number;
}[];
} | ((...items: {
from: string;
to: string;
display: string;
section: number;
}[]) => number) | ((searchElement: {
from: string;
to: string;
display: string;
section: number;
}, fromIndex?: number | undefined) => number) | ((searchElement: {
from: string;
to: string;
display: string;
section: number;
}, fromIndex?: number | undefined) => number) | ((callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any) => boolean) | ((callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any) => boolean) | ((callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => void, thisArg?: any) => void) | (<U>(callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => U, thisArg?: any) => U[]) | {
<S extends {
from: string;
to: string;
display: string;
section: number;
}>(callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => value is S, thisArg?: any): S[];
(callbackfn: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any): {
from: string;
to: string;
display: string;
section: number;
}[];
} | {
(callbackfn: (previousValue: {
from: string;
to: string;
display: string;
section: number;
}, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => {
from: string;
to: string;
display: string;
section: number;
}): {
from: string;
to: string;
display: string;
section: number;
};
(callbackfn: (previousValue: {
from: string;
to: string;
display: string;
section: number;
}, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => {
from: string;
to: string;
display: string;
section: number;
}, initialValue: {
from: string;
to: string;
display: string;
section: number;
}): {
from: string;
to: string;
display: string;
section: number;
};
<U_1>(callbackfn: (previousValue: U_1, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => U_1, initialValue: U_1): U_1;
} | {
(callbackfn: (previousValue: {
from: string;
to: string;
display: string;
section: number;
}, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => {
from: string;
to: string;
display: string;
section: number;
}): {
from: string;
to: string;
display: string;
section: number;
};
(callbackfn: (previousValue: {
from: string;
to: string;
display: string;
section: number;
}, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => {
from: string;
to: string;
display: string;
section: number;
}, initialValue: {
from: string;
to: string;
display: string;
section: number;
}): {
from: string;
to: string;
display: string;
section: number;
};
<U_2>(callbackfn: (previousValue: U_2, currentValue: {
from: string;
to: string;
display: string;
section: number;
}, currentIndex: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => U_2, initialValue: U_2): U_2;
} | {
<S_1 extends {
from: string;
to: string;
display: string;
section: number;
}>(predicate: (this: void, value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, obj: {
from: string;
to: string;
display: string;
section: number;
}[]) => value is S_1, thisArg?: any): S_1 | undefined;
(predicate: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, obj: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any): {
from: string;
to: string;
display: string;
section: number;
} | undefined;
} | ((predicate: (value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, obj: {
from: string;
to: string;
display: string;
section: number;
}[]) => unknown, thisArg?: any) => number) | ((value: {
from: string;
to: string;
display: string;
section: number;
}, start?: number | undefined, end?: number | undefined) => {
from: string;
to: string;
display: string;
section: number;
}[]) | ((target: number, start: number, end?: number | undefined) => {
from: string;
to: string;
display: string;
section: number;
}[]) | (() => IterableIterator<[number, {
from: string;
to: string;
display: string;
section: number;
}]>) | (() => IterableIterator<number>) | (() => IterableIterator<{
from: string;
to: string;
display: string;
section: number;
}>) | ((searchElement: {
from: string;
to: string;
display: string;
section: number;
}, fromIndex?: number | undefined) => boolean) | (<U_3, This = undefined>(callback: (this: This, value: {
from: string;
to: string;
display: string;
section: number;
}, index: number, array: {
from: string;
to: string;
display: string;
section: number;
}[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | {
<U_4>(this: U_4[][][][][][][][], depth: 7): U_4[];
<U_5>(this: U_5[][][][][][][], depth: 6): U_5[];
<U_6>(this: U_6[][][][][][], depth: 5): U_6[];
<U_7>(this: U_7[][][][][], depth: 4): U_7[];
<U_8>(this: U_8[][][][], depth: 3): U_8[];
<U_9>(this: U_9[][][], depth: 2): U_9[];
<U_10>(this: U_10[][], depth?: 1 | undefined): U_10[];
<U_11>(this: U_11[], depth: 0): U_11[];
<U_12>(depth?: number | undefined): any[];
})[]>`
@@ -0,0 +1,25 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "isValidTimeSpan"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
draft = true
+++
## rangeUtil.isValidTimeSpan variable
### rangeUtil.isValidTimeSpan variable
<b>Signature</b>
```typescript
isValidTimeSpan: (value: string) => boolean
```
<b>Import</b>
```typescript
import { rangeUtil } from '@grafana/data';
const { isValidTimeSpan } = rangeUtil;
```