Skip to content

Commit

Permalink
Make generated type docs more explorable (elastic#47069)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Oct 15, 2019
1 parent 570cbf7 commit 5a337f2
Show file tree
Hide file tree
Showing 192 changed files with 1,781 additions and 1,154 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,17 @@ export interface VizRenderContext {
}

export type VizRenderer = (context: VizRenderContext, domElement: HTMLElement) => () => void;
// When a renderer is bound via `contextContainer.createHandler` this is the type that will be returned.
type BoundVizRenderer = (domElement: HTMLElement) => () => void;

class VizRenderingPlugin {
private readonly vizRenderers = new Map<string, ((domElement: HTMLElement) => () => void)>();
private readonly contextContainer?: IContextContainer<VizRenderer>;
private readonly vizRenderers = new Map<string, BoundVizRenderer>();

constructor(private readonly initContext: PluginInitializerContext) {}

setup(core) {
this.contextContainer = core.context.createContextContainer<
VizRenderContext,
ReturnType<VizRenderer>,
[HTMLElement]
>();
this.contextContainer = core.context.createContextContainer();

return {
registerContext: this.contextContainer.registerContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## ErrorToastOptions interface

Options available for [IToasts](./kibana-plugin-public.itoasts.md) APIs.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
error: Error | HttpFetchError;
error: Error | IHttpFetchError;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface HttpErrorResponse
| Property | Type | Description |
| --- | --- | --- |
| [body](./kibana-plugin-public.httperrorresponse.body.md) | <code>HttpBody</code> | |
| [error](./kibana-plugin-public.httperrorresponse.error.md) | <code>Error &#124; HttpFetchError</code> | |
| [error](./kibana-plugin-public.httperrorresponse.error.md) | <code>Error &#124; IHttpFetchError</code> | |
| [request](./kibana-plugin-public.httperrorresponse.request.md) | <code>Request</code> | |
| [response](./kibana-plugin-public.httperrorresponse.response.md) | <code>Response</code> | |

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpFetchOptions.headers property

Headers to send with the request. See [HttpHeadersInit](./kibana-plugin-public.httpheadersinit.md)<!-- -->.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## HttpFetchOptions interface

All options that may be used with a [HttpHandler](./kibana-plugin-public.httphandler.md)<!-- -->.

<b>Signature:</b>

Expand All @@ -15,7 +16,7 @@ export interface HttpFetchOptions extends HttpRequestInit
| Property | Type | Description |
| --- | --- | --- |
| [headers](./kibana-plugin-public.httpfetchoptions.headers.md) | <code>HttpHeadersInit</code> | |
| [prependBasePath](./kibana-plugin-public.httpfetchoptions.prependbasepath.md) | <code>boolean</code> | |
| [query](./kibana-plugin-public.httpfetchoptions.query.md) | <code>HttpFetchQuery</code> | |
| [headers](./kibana-plugin-public.httpfetchoptions.headers.md) | <code>HttpHeadersInit</code> | Headers to send with the request. See [HttpHeadersInit](./kibana-plugin-public.httpheadersinit.md)<!-- -->. |
| [prependBasePath](./kibana-plugin-public.httpfetchoptions.prependbasepath.md) | <code>boolean</code> | Whether or not the request should automatically prepend the basePath. Defaults to <code>true</code>. |
| [query](./kibana-plugin-public.httpfetchoptions.query.md) | <code>HttpFetchQuery</code> | The query string for an HTTP request. See [HttpFetchQuery](./kibana-plugin-public.httpfetchquery.md)<!-- -->. |
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpFetchOptions.prependBasePath property

Whether or not the request should automatically prepend the basePath. Defaults to `true`<!-- -->.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpFetchOptions.query property

The query string for an HTTP request. See [HttpFetchQuery](./kibana-plugin-public.httpfetchquery.md)<!-- -->.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## HttpHandler type

A function for making an HTTP requests to Kibana's backend. See [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) for options and [HttpBody](./kibana-plugin-public.httpbody.md) for the response.

<b>Signature:</b>

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## HttpInterceptor interface

An object that may define global interceptor functions for different parts of the request and response lifecycle. See [IHttpInterceptController](./kibana-plugin-public.ihttpinterceptcontroller.md)<!-- -->.

<b>Signature:</b>

Expand All @@ -15,8 +16,8 @@ export interface HttpInterceptor

| Method | Description |
| --- | --- |
| [request(request, controller)](./kibana-plugin-public.httpinterceptor.request.md) | |
| [requestError(httpErrorRequest, controller)](./kibana-plugin-public.httpinterceptor.requesterror.md) | |
| [response(httpResponse, controller)](./kibana-plugin-public.httpinterceptor.response.md) | |
| [responseError(httpErrorResponse, controller)](./kibana-plugin-public.httpinterceptor.responseerror.md) | |
| [request(request, controller)](./kibana-plugin-public.httpinterceptor.request.md) | Define an interceptor to be executed before a request is sent. |
| [requestError(httpErrorRequest, controller)](./kibana-plugin-public.httpinterceptor.requesterror.md) | Define an interceptor to be executed if a request interceptor throws an error or returns a rejected Promise. |
| [response(httpResponse, controller)](./kibana-plugin-public.httpinterceptor.response.md) | Define an interceptor to be executed after a response is received. |
| [responseError(httpErrorResponse, controller)](./kibana-plugin-public.httpinterceptor.responseerror.md) | Define an interceptor to be executed if a response interceptor throws an error or returns a rejected Promise. |

Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

## HttpInterceptor.request() method

Define an interceptor to be executed before a request is sent.

<b>Signature:</b>

```typescript
request?(request: Request, controller: HttpInterceptController): Promise<Request> | Request | void;
request?(request: Request, controller: IHttpInterceptController): Promise<Request> | Request | void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| request | <code>Request</code> | |
| controller | <code>HttpInterceptController</code> | |
| controller | <code>IHttpInterceptController</code> | |
<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

## HttpInterceptor.requestError() method

Define an interceptor to be executed if a request interceptor throws an error or returns a rejected Promise.

<b>Signature:</b>

```typescript
requestError?(httpErrorRequest: HttpErrorRequest, controller: HttpInterceptController): Promise<Request> | Request | void;
requestError?(httpErrorRequest: HttpErrorRequest, controller: IHttpInterceptController): Promise<Request> | Request | void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| httpErrorRequest | <code>HttpErrorRequest</code> | |
| controller | <code>HttpInterceptController</code> | |
| controller | <code>IHttpInterceptController</code> | |
<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

## HttpInterceptor.response() method

Define an interceptor to be executed after a response is received.

<b>Signature:</b>

```typescript
response?(httpResponse: HttpResponse, controller: HttpInterceptController): Promise<HttpResponse> | HttpResponse | void;
response?(httpResponse: HttpResponse, controller: IHttpInterceptController): Promise<HttpResponse> | HttpResponse | void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| httpResponse | <code>HttpResponse</code> | |
| controller | <code>HttpInterceptController</code> | |
| controller | <code>IHttpInterceptController</code> | |
<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

## HttpInterceptor.responseError() method

Define an interceptor to be executed if a response interceptor throws an error or returns a rejected Promise.

<b>Signature:</b>

```typescript
responseError?(httpErrorResponse: HttpErrorResponse, controller: HttpInterceptController): Promise<HttpResponse> | HttpResponse | void;
responseError?(httpErrorResponse: HttpErrorResponse, controller: IHttpInterceptController): Promise<HttpResponse> | HttpResponse | void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| httpErrorResponse | <code>HttpErrorResponse</code> | |
| controller | <code>HttpInterceptController</code> | |
| controller | <code>IHttpInterceptController</code> | |
<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpRequestInit.body property

A BodyInit object or null to set request's body.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpRequestInit.cache property

The cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpRequestInit.credentials property

The credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpRequestInit.headers property

[HttpHeadersInit](./kibana-plugin-public.httpheadersinit.md)

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpRequestInit.integrity property

Subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## HttpRequestInit.keepalive property

Whether or not request can outlive the global in which it was created.

<b>Signature:</b>

```typescript
Expand Down
Loading

0 comments on commit 5a337f2

Please sign in to comment.