@@ -202,7 +202,7 @@ describe('Git', () => {
|
||||
await git.clone({ url, dir });
|
||||
|
||||
const { onAuth } = (
|
||||
isomorphic.clone as unknown as jest.Mock<typeof isomorphic['clone']>
|
||||
isomorphic.clone as unknown as jest.Mock<(typeof isomorphic)['clone']>
|
||||
).mock.calls[0][0]!;
|
||||
|
||||
expect(onAuth()).toEqual(auth);
|
||||
@@ -315,7 +315,7 @@ describe('Git', () => {
|
||||
await git.fetch({ remote, dir });
|
||||
|
||||
const { onAuth } = (
|
||||
isomorphic.fetch as unknown as jest.Mock<typeof isomorphic['fetch']>
|
||||
isomorphic.fetch as unknown as jest.Mock<(typeof isomorphic)['fetch']>
|
||||
).mock.calls[0][0]!;
|
||||
|
||||
expect(onAuth()).toEqual(auth);
|
||||
@@ -486,7 +486,7 @@ describe('Git', () => {
|
||||
await git.push({ remote, dir, remoteRef, force });
|
||||
|
||||
const { onAuth } = (
|
||||
isomorphic.push as unknown as jest.Mock<typeof isomorphic['push']>
|
||||
isomorphic.push as unknown as jest.Mock<(typeof isomorphic)['push']>
|
||||
).mock.calls[0][0]!;
|
||||
|
||||
expect(onAuth()).toEqual(auth);
|
||||
|
||||
@@ -188,12 +188,12 @@ export function InfoCard(props: Props): JSX.Element {
|
||||
variants.forEach(name => {
|
||||
calculatedStyle = {
|
||||
...calculatedStyle,
|
||||
...VARIANT_STYLES.card[name as keyof typeof VARIANT_STYLES['card']],
|
||||
...VARIANT_STYLES.card[name as keyof (typeof VARIANT_STYLES)['card']],
|
||||
};
|
||||
calculatedCardStyle = {
|
||||
...calculatedCardStyle,
|
||||
...VARIANT_STYLES.cardContent[
|
||||
name as keyof typeof VARIANT_STYLES['cardContent']
|
||||
name as keyof (typeof VARIANT_STYLES)['cardContent']
|
||||
],
|
||||
};
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { OptionValues } from 'commander';
|
||||
|
||||
type Publisher = keyof typeof PublisherConfig['configFactories'];
|
||||
type Publisher = keyof (typeof PublisherConfig)['configFactories'];
|
||||
type PublisherConfiguration = {
|
||||
[p in Publisher]?: any;
|
||||
} & {
|
||||
@@ -73,7 +73,7 @@ export class PublisherConfig {
|
||||
*/
|
||||
private static isKnownPublisher(
|
||||
type: string,
|
||||
): type is keyof typeof PublisherConfig['configFactories'] {
|
||||
): type is keyof (typeof PublisherConfig)['configFactories'] {
|
||||
return PublisherConfig.configFactories.hasOwnProperty(type);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export const BADGE_STYLES = [
|
||||
] as const;
|
||||
|
||||
/** @public */
|
||||
export type BadgeStyle = typeof BADGE_STYLES[number];
|
||||
export type BadgeStyle = (typeof BADGE_STYLES)[number];
|
||||
|
||||
/** @public */
|
||||
export interface Badge {
|
||||
|
||||
@@ -107,7 +107,7 @@ export namespace Models {
|
||||
* @public
|
||||
*/
|
||||
export type BaseCommitSummaryMarkupEnum =
|
||||
typeof BaseCommitSummaryMarkupEnum[keyof typeof BaseCommitSummaryMarkupEnum];
|
||||
(typeof BaseCommitSummaryMarkupEnum)[keyof typeof BaseCommitSummaryMarkupEnum];
|
||||
|
||||
/**
|
||||
* A branch object, representing a branch in a repository.
|
||||
@@ -146,7 +146,7 @@ export namespace Models {
|
||||
* @public
|
||||
*/
|
||||
export type BranchMergeStrategiesEnum =
|
||||
typeof BranchMergeStrategiesEnum[keyof typeof BranchMergeStrategiesEnum];
|
||||
(typeof BranchMergeStrategiesEnum)[keyof typeof BranchMergeStrategiesEnum];
|
||||
|
||||
/**
|
||||
* A repository commit object.
|
||||
@@ -191,7 +191,7 @@ export namespace Models {
|
||||
* @public
|
||||
*/
|
||||
export type CommitFileAttributesEnum =
|
||||
typeof CommitFileAttributesEnum[keyof typeof CommitFileAttributesEnum];
|
||||
(typeof CommitFileAttributesEnum)[keyof typeof CommitFileAttributesEnum];
|
||||
|
||||
/**
|
||||
* A link to a resource related to this object.
|
||||
@@ -280,7 +280,7 @@ export namespace Models {
|
||||
* @public
|
||||
*/
|
||||
export type ParticipantRoleEnum =
|
||||
typeof ParticipantRoleEnum[keyof typeof ParticipantRoleEnum];
|
||||
(typeof ParticipantRoleEnum)[keyof typeof ParticipantRoleEnum];
|
||||
|
||||
/**
|
||||
* @public
|
||||
@@ -295,7 +295,7 @@ export namespace Models {
|
||||
* @public
|
||||
*/
|
||||
export type ParticipantStateEnum =
|
||||
typeof ParticipantStateEnum[keyof typeof ParticipantStateEnum];
|
||||
(typeof ParticipantStateEnum)[keyof typeof ParticipantStateEnum];
|
||||
|
||||
/**
|
||||
* A Bitbucket project.
|
||||
@@ -423,7 +423,7 @@ export namespace Models {
|
||||
* @public
|
||||
*/
|
||||
export type RepositoryForkPolicyEnum =
|
||||
typeof RepositoryForkPolicyEnum[keyof typeof RepositoryForkPolicyEnum];
|
||||
(typeof RepositoryForkPolicyEnum)[keyof typeof RepositoryForkPolicyEnum];
|
||||
|
||||
/**
|
||||
* @public
|
||||
@@ -436,7 +436,7 @@ export namespace Models {
|
||||
* @public
|
||||
*/
|
||||
export type RepositoryScmEnum =
|
||||
typeof RepositoryScmEnum[keyof typeof RepositoryScmEnum];
|
||||
(typeof RepositoryScmEnum)[keyof typeof RepositoryScmEnum];
|
||||
|
||||
/**
|
||||
* @public
|
||||
|
||||
Reference in New Issue
Block a user