Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Orel <[email protected]>
  • Loading branch information
olexii4 committed Dec 6, 2023
1 parent d5fe61f commit af8bd95
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Workspace creation time', () => {
const mockPost = mockAxios.post as jest.Mock;

let execTime: number;
let execTimer: number | undefined = undefined;
let execTimer: number;

beforeEach(() => {
execTime = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export default class Bootstrap {
}

private checkWorkspaceStopped(): void {
let stoppedWorkspace: Workspace | undefined = undefined;
let stoppedWorkspace: Workspace | undefined;

try {
stoppedWorkspace = this.workspaceStoppedDetector.checkWorkspaceStopped(this.store.getState());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export async function fetchRegistryMetadata(
const devfileMetaDataArr: che.DevfileMetaData[] = [];
for (const [index, location] of registryIndexLocations.entries()) {
try {
let data: che.DevfileMetaData[] | undefined = undefined;
let data: che.DevfileMetaData[] | undefined;
if (isExternal) {
try {
data = await getDataResolver(location);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ describe('Workspace-client helpers', () => {
optionalFilesContent[CHE_EDITOR_YAML_PATH] = dump({ inline: editor });
const store = new FakeStoreBuilder().build();

let errorText: string | undefined = undefined;
let errorText: string | undefined;

try {
await getCustomEditor(
Expand Down Expand Up @@ -394,7 +394,7 @@ describe('Workspace-client helpers', () => {
})
.build();

let errorText: string | undefined = undefined;
let errorText: string | undefined;
try {
await getCustomEditor(
pluginRegistryUrl,
Expand Down Expand Up @@ -490,7 +490,7 @@ describe('Workspace-client helpers', () => {
})
.build();

let errorText: string | undefined = undefined;
let errorText: string | undefined;
try {
await getCustomEditor(
pluginRegistryUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export async function getCustomEditor(
dispatch: ThunkDispatch<AppState, unknown, KnownAction>,
getState: () => AppState,
): Promise<string | undefined> {
let editorsDevfile: devfileApi.Devfile | undefined = undefined;
let editorsDevfile: devfileApi.Devfile | undefined;

// do we have a custom editor specified in the repository ?
const cheEditorYaml = optionalFilesContent[CHE_EDITOR_YAML_PATH]
Expand All @@ -139,8 +139,8 @@ export async function getCustomEditor(
// check the content of cheEditor file
console.debug('Using the repository .che/che-editor.yaml file', cheEditorYaml);

let repositoryEditorYaml: devfileApi.Devfile | undefined = undefined;
let repositoryEditorYamlUrl: string | undefined = undefined;
let repositoryEditorYaml: devfileApi.Devfile | undefined;
let repositoryEditorYamlUrl: string | undefined;
// it's an inlined editor, use the inline content
if (cheEditorYaml.inline) {
console.debug('Using the inline content of the repository editor');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Get Devfile by URL', () => {
it('Should throw the "plugin registry URL is required" error message', async () => {
const store = new FakeStoreBuilder().build();

let errorText: string | undefined = undefined;
let errorText: string | undefined;
try {
await getEditor('che-incubator/che-idea/next', store.dispatch, store.getState);
} catch (e) {
Expand All @@ -51,7 +51,7 @@ describe('Get Devfile by URL', () => {
it('Should throw the "failed to fetch editor yaml" error message', async () => {
const store = new FakeStoreBuilder().build();

let errorText: string | undefined = undefined;
let errorText: string | undefined;
try {
await getEditor(
'che-incubator/che-idea/next',
Expand Down

0 comments on commit af8bd95

Please sign in to comment.