mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 17:30:46 +00:00
Prettier 2.0 (#393)
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import { configContext, Platform } from "../ConfigContext";
|
||||
import * as ViewModels from "../Contracts/ViewModels";
|
||||
import { PortalTokenProvider } from "./PortalTokenProvider";
|
||||
|
||||
export class TokenProviderFactory {
|
||||
private constructor() {}
|
||||
|
||||
public static create(): ViewModels.TokenProvider {
|
||||
const platformType = configContext.platform;
|
||||
switch (platformType) {
|
||||
case Platform.Portal:
|
||||
case Platform.Hosted:
|
||||
return new PortalTokenProvider();
|
||||
case Platform.Emulator:
|
||||
default:
|
||||
// should never get into this state
|
||||
throw new Error(`Unknown platform ${platformType}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
import { configContext, Platform } from "../ConfigContext";
|
||||
import * as ViewModels from "../Contracts/ViewModels";
|
||||
import { PortalTokenProvider } from "./PortalTokenProvider";
|
||||
|
||||
export class TokenProviderFactory {
|
||||
private constructor() {}
|
||||
|
||||
public static create(): ViewModels.TokenProvider {
|
||||
const platformType = configContext.platform;
|
||||
switch (platformType) {
|
||||
case Platform.Portal:
|
||||
case Platform.Hosted:
|
||||
return new PortalTokenProvider();
|
||||
case Platform.Emulator:
|
||||
default:
|
||||
// should never get into this state
|
||||
throw new Error(`Unknown platform ${platformType}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user