API optional augmentation (#4355)
* API optional augmentation
* Rebuild
* Rebuild
* Cleanups
* Adjust, no multi-imports
* Adjust
* Adjust
* Dedupe
* Augmented exports
* It builds via references (no circulars)
* Don't output *.manual.{js,cjs}
This commit is contained in:
@@ -2,4 +2,3 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/api-augment';
|
||||
import '@polkadot/rpc-augment';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DeriveCustom } from '@polkadot/api-base/types';
|
||||
import type { AnyFunction } from '@polkadot/types/types';
|
||||
import type { DeriveCustom, ExactDerive } from './derive';
|
||||
import type { ExactDerive } from './derive';
|
||||
import type { DeriveApi } from './types';
|
||||
|
||||
import { lazyDeriveSection } from './util/lazy';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './augment';
|
||||
import '@polkadot/api-augment';
|
||||
|
||||
import { derive } from '.';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AnyFunction } from '@polkadot/types/types';
|
||||
|
||||
import * as accounts from './accounts';
|
||||
@@ -34,8 +33,4 @@ type DeriveAllSections<AllSections> = {
|
||||
[S in keyof AllSections]: DeriveSection<AllSections[S]>
|
||||
};
|
||||
|
||||
type DeriveCreator = (instanceId: string, api: unknown) => (...args: unknown[]) => Observable<any>;
|
||||
|
||||
export type DeriveCustom = Record<string, Record<string, DeriveCreator>>;
|
||||
|
||||
export type ExactDerive = DeriveAllSections<typeof derive>;
|
||||
|
||||
Reference in New Issue
Block a user