Use .js imports in src (#5526)
* Use .js imports in src * Adjust * Fix imports * Bump dev * Adjust with .js imports for typegen * Adjust * Adjust * Remove target override
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './indexes';
|
||||
export * from './info';
|
||||
export * from './progress';
|
||||
export * from './indexes.js';
|
||||
export * from './info.js';
|
||||
export * from './progress.js';
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option, u32 } from '@polkadot/types';
|
||||
import type { ActiveEraInfo, EraIndex, Moment, SessionIndex } from '@polkadot/types/interfaces';
|
||||
import type { DeriveApi, DeriveSessionIndexes } from '../types';
|
||||
import type { DeriveApi, DeriveSessionIndexes } from '../types.js';
|
||||
|
||||
import { map, of } from 'rxjs';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
// parse into Indexes
|
||||
function parse ([currentIndex, activeEra, activeEraStart, currentEra, validatorCount]: [SessionIndex, EraIndex, Option<Moment>, EraIndex, u32]): DeriveSessionIndexes {
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { DeriveApi, DeriveSessionInfo } from '../types';
|
||||
import type { DeriveApi, DeriveSessionInfo } from '../types.js';
|
||||
|
||||
import { map } from 'rxjs';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @description Retrieves all the session and era query and calculates specific values on it as the length of the session and eras
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option, u64 } from '@polkadot/types';
|
||||
import type { BlockNumber, SessionIndex } from '@polkadot/types/interfaces';
|
||||
import type { DeriveApi, DeriveSessionInfo, DeriveSessionProgress } from '../types';
|
||||
import type { DeriveApi, DeriveSessionInfo, DeriveSessionProgress } from '../types.js';
|
||||
|
||||
import { combineLatest, map, of, switchMap } from 'rxjs';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
type ResultSlotsNoSession = [u64, u64, u64];
|
||||
type ResultSlots = [u64, u64, u64, Option<SessionIndex>];
|
||||
|
||||
Reference in New Issue
Block a user