refactor: Upgrade to TypeScript 5.5 (no-changelog) (#9828)

This commit is contained in:
Iván Ovejero
2024-06-24 17:49:59 +02:00
committed by GitHub
parent 1ba656ef4a
commit e33a47311f
16 changed files with 321 additions and 322 deletions

View File

@@ -235,13 +235,14 @@ export class SourceControlExportService {
data: ICredentialDataDecryptedObject,
): ICredentialDataDecryptedObject => {
for (const [key] of Object.entries(data)) {
const value = data[key];
try {
if (data[key] === null) {
if (value === null) {
delete data[key]; // remove invalid null values
} else if (typeof data[key] === 'object') {
data[key] = this.replaceCredentialData(data[key] as ICredentialDataDecryptedObject);
} else if (typeof data[key] === 'string') {
data[key] = stringContainsExpression(data[key] as string) ? data[key] : '';
} else if (typeof value === 'object') {
data[key] = this.replaceCredentialData(value as ICredentialDataDecryptedObject);
} else if (typeof value === 'string') {
data[key] = stringContainsExpression(value) ? data[key] : '';
} else if (typeof data[key] === 'number') {
// TODO: leaving numbers in for now, but maybe we should remove them
continue;

View File

@@ -84,8 +84,8 @@ export class SourceControlImportService {
}),
);
return remoteWorkflowFilesParsed.filter(
(e) => e !== undefined,
) as SourceControlWorkflowVersionId[];
(e): e is SourceControlWorkflowVersionId => e !== undefined,
);
}
public async getLocalVersionIdsFromDb(): Promise<SourceControlWorkflowVersionId[]> {