Skip to content

Commit

Permalink
[core-lro] ensures types are included in package (Azure#5724)
Browse files Browse the repository at this point in the history
  • Loading branch information
chradek authored and ramya-rao-a committed Oct 22, 2019
1 parent 5297357 commit 84fd6d5
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdk/core/core-lro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
],
"main": "./dist/index.js",
"module": "dist-esm/src/index.js",
"types": "./types/src/index.d.ts",
"types": "./types/core-lro.d.ts",
"files": [
"types/core-lro.d.ts",
"dist/",
Expand Down Expand Up @@ -69,12 +69,13 @@
},
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build": "npm run build:es6 && npm run build:nodebrowser",
"build": "npm run build:es6 && npm run build:nodebrowser && npm run extract-api",
"build:es6": "tsc -p tsconfig.json",
"build:nodebrowser": "rollup -c 2>&1",
"build:test": "npm run build:es6 && rollup -c rollup.test.config.js 2>&1",
"check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
"clean": "rimraf dist dist-esm dist-test types *.log browser statistics.html coverage src/**/*.js test/**/*.js",
"extract-api": "tsc -p . && api-extractor run --local",
"format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
Expand Down
125 changes: 125 additions & 0 deletions sdk/core/core-lro/review/core-lro.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
## API Report File for "@azure/core-lro"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import { AbortSignalLike } from '@azure/abort-controller';

// @public (undocumented)
export type CancelOnProgress = () => void;

// @public (undocumented)
export abstract class Poller<TState, TResult> implements PollerLike<TState, TResult> {
constructor(operation: PollOperation<TState, TResult>);
// (undocumented)
cancelOperation(options?: {
abortSignal?: AbortSignal;
}): Promise<void>;
// (undocumented)
protected abstract delay(): Promise<void>;
// (undocumented)
getOperationState(): PollOperationState<TResult>;
// (undocumented)
getResult(): TResult | undefined;
// (undocumented)
isDone(): boolean;
// (undocumented)
isStopped(): boolean;
// (undocumented)
onProgress(callback: (state: TState) => void): CancelOnProgress;
// (undocumented)
protected operation: PollOperation<TState, TResult>;
// (undocumented)
poll(options?: {
abortSignal?: AbortSignal;
}): Promise<void>;
// (undocumented)
pollUntilDone(): Promise<TResult>;
// (undocumented)
stopPolling(): void;
// (undocumented)
toString(): string;
}

// @public (undocumented)
export class PollerCancelledError extends Error {
constructor(message: string);
}

// @public (undocumented)
export interface PollerLike<TState, TResult> {
// (undocumented)
cancelOperation(options?: {
abortSignal?: AbortSignal;
}): Promise<void>;
// (undocumented)
getOperationState(): PollOperationState<TResult>;
// (undocumented)
getResult(): TResult | undefined;
// (undocumented)
isDone(): boolean;
// (undocumented)
isStopped(): boolean;
// (undocumented)
onProgress(callback: (state: TState) => void): CancelOnProgress;
// (undocumented)
poll(options?: {
abortSignal?: AbortSignal;
}): Promise<void>;
// (undocumented)
pollUntilDone(): Promise<TResult>;
// (undocumented)
stopPolling(): void;
// (undocumented)
toString(): string;
}

// @public (undocumented)
export class PollerStoppedError extends Error {
constructor(message: string);
}

// @public (undocumented)
export type PollOperation<TState, TResult> = PollOperationBase<TState, TResult> & {
[prop: string]: any;
};

// @public (undocumented)
export interface PollOperationBase<TState, TResult> {
// (undocumented)
cancel(options?: {
abortSignal?: AbortSignal;
}): Promise<PollOperation<TState, TResult>>;
// (undocumented)
state: TState;
// (undocumented)
toString(): string;
// (undocumented)
update(options?: {
abortSignal?: AbortSignalLike;
fireProgress?: (state: TState) => void;
}): Promise<PollOperation<TState, TResult>>;
}

// @public (undocumented)
export interface PollOperationState<TResult> {
// (undocumented)
error?: Error;
// (undocumented)
isCancelled?: boolean;
// (undocumented)
isCompleted?: boolean;
// (undocumented)
isStarted?: boolean;
// (undocumented)
result?: TResult;
}

// @public (undocumented)
export type PollProgressCallback<TState> = (state: TState) => void;


// (No @packageDocumentation comment for this package)

```

0 comments on commit 84fd6d5

Please sign in to comment.