diff --git a/configuration/tsconfig/tsconfig.json b/configuration/tsconfig/tsconfig.json
index b807e58d..6a2c1b9d 100644
--- a/configuration/tsconfig/tsconfig.json
+++ b/configuration/tsconfig/tsconfig.json
@@ -5,7 +5,6 @@
"checkJs": true,
"declaration": true,
"emitDecoratorMetadata": true,
- "exactOptionalPropertyTypes": true,
"experimentalDecorators": true,
"explainFiles": true,
"inlineSourceMap": true,
diff --git a/examples/minimal-plugin/src/app.ts b/examples/minimal-plugin/src/app.ts
index be52ff57..ef5cacdf 100644
--- a/examples/minimal-plugin/src/app.ts
+++ b/examples/minimal-plugin/src/app.ts
@@ -48,16 +48,16 @@ const program = new Command()
const options = program.opts();
// create an instance of the PluginClient
-const pluginClient = new PluginClient(new HttpClient(), options.backendUrl);
+const pluginClient = new PluginClient(new HttpClient(), options['backendUrl']);
// create an instance of your plugin
const plugin = new MinimalPlugin(
// tslint:disable-next-line:no-magic-numbers
- Number.parseInt(options.port, 10),
- options.pluginName,
- options.url,
- `/${options.routeName}`,
- options.backendUrl,
+ Number.parseInt(options['port'], 10),
+ options['pluginName'],
+ options['url'],
+ `/${options['routeName']}`,
+ options['backendUrl'],
new Converter(path.resolve(__dirname, '..', 'src', 'plugin', 'protocol')), // an instance of the converter. Required
// because your requests and response schemas are defined in the plugin. The path should lead to your request and
// response interfaces
@@ -69,7 +69,7 @@ const plugin = new MinimalPlugin(
pluginClient
.registerPlugin(plugin)
.then(() => {
- Logger.ok(`Successfully registered plugin '${options.pluginName}' on /${options.routeName} .`);
+ Logger.ok(`Successfully registered plugin '${options['pluginName']}' on /${options['routeName']} .`);
})
// eslint-disable-next-line unicorn/prefer-top-level-await
.catch((error: Error) => {
@@ -81,7 +81,9 @@ for (const signal of [`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`]) {
pluginClient
.unregisterPlugin(plugin)
.then(() => {
- Logger.ok(`Successfully unregistered plugin '${options.pluginName}' from /${options.routeName} .`);
+ Logger.ok(
+ `Successfully unregistered plugin '${options['pluginName']}' from /${options['routeName']} .`,
+ );
})
.catch((error: Error) => {
throw error;
diff --git a/frontend/app/icons.config.mjs b/frontend/app/icons.config.mjs
index d44b9fe8..c14c5864 100644
--- a/frontend/app/icons.config.mjs
+++ b/frontend/app/icons.config.mjs
@@ -12,8 +12,9 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see .
*/
-
-/** @type {import('./scripts/icon-config').IconConfig} */
+/**
+ * @type {import('./scripts/icon-config').IconConfig}
+ */
const config = {
inputPath: 'node_modules/material-symbols/material-symbols-rounded.woff2',
outputPath: 'src/assets/icons.min.woff2',
diff --git a/frontend/app/tsconfig.json b/frontend/app/tsconfig.json
index 6e06e031..28ac70d1 100644
--- a/frontend/app/tsconfig.json
+++ b/frontend/app/tsconfig.json
@@ -6,8 +6,7 @@
"outDir": "./dist/out-tsc",
"declaration": false,
"isolatedModules": false,
- "checkJs": false,
- "allowJs": false,
+ "allowSyntheticDefaultImports": true,
"strictPropertyInitialization": false,
"downlevelIteration": true,
"importHelpers": true,
@@ -20,3 +19,6 @@
},
"exclude": ["**/*.spec.ts"]
}
+
+
+
diff --git a/packages/api-plugin/environment.d.ts b/packages/api-plugin/environment.d.ts
new file mode 100644
index 00000000..3fa4522f
--- /dev/null
+++ b/packages/api-plugin/environment.d.ts
@@ -0,0 +1,10 @@
+declare global {
+ namespace NodeJS {
+ interface ProcessEnv {
+ NODE_ENV?: string;
+ PORT?: string;
+ }
+ }
+}
+
+export {};
diff --git a/packages/api-plugin/src/plugin.ts b/packages/api-plugin/src/plugin.ts
index ab56d8f0..4c88deaf 100644
--- a/packages/api-plugin/src/plugin.ts
+++ b/packages/api-plugin/src/plugin.ts
@@ -175,13 +175,11 @@ export abstract class Plugin {
// tslint:disable-next-line:no-floating-promises
Logger.error(`${bind} requires elevated privileges`);
process.exit(1);
- break;
}
case 'EADDRINUSE': {
// tslint:disable-next-line:no-floating-promises
Logger.error(`${bind} is already in use`);
process.exit(1);
- break;
}
default: {
throw error;
diff --git a/packages/api/src/client.ts b/packages/api/src/client.ts
index 2c16c1be..2ed12c02 100644
--- a/packages/api/src/client.ts
+++ b/packages/api/src/client.ts
@@ -128,8 +128,8 @@ export class Client {
size: 1,
});
- if (response.data.length === 1 && response.data[0].uid === uid) {
- return response.data[0];
+ if (response.data.length === 1 && response.data[0]!.uid === uid) {
+ return response.data[0]!;
}
throw new SCInternalServerErrorResponse(new SCNotFoundErrorResponse(true), true);
@@ -220,11 +220,11 @@ export class Client {
for (const key of Object.keys(multiSearchRequest)) {
const searchRequest = multiSearchRequest[key];
- if (searchRequest.size === undefined) {
+ if (searchRequest?.size === undefined) {
preFlightRequest[key] = {
...searchRequest,
};
- preFlightRequest[key].size = 0;
+ preFlightRequest[key]!.size = 0;
preFlightNecessary = true;
}
}
@@ -245,8 +245,8 @@ export class Client {
);
// set size for multi search requests that were in pre flight request
- for (const key of Object.keys(preFlightRequest)) {
- returnMultiSearchRequest[key].size = preFlightResponse[key].pagination.total;
+ for (const key in preFlightRequest) {
+ returnMultiSearchRequest[key]!.size = preFlightResponse[key]!.pagination.total;
}
}
diff --git a/packages/api/src/connector-client.ts b/packages/api/src/connector-client.ts
index 7287b6c4..a0a169bd 100644
--- a/packages/api/src/connector-client.ts
+++ b/packages/api/src/connector-client.ts
@@ -212,7 +212,7 @@ export class ConnectorClient extends Client {
const thingSource = source === undefined ? 'stapps-api' : source;
// request a new bulk
- const bulk = await this.bulk(things[0].type, thingSource, timeout);
+ const bulk = await this.bulk(things[0]!.type, thingSource, timeout);
// add items to the bulk - 5 concurrently
await Promise.all(
diff --git a/packages/api/src/errors.ts b/packages/api/src/errors.ts
index 547b0616..14801885 100644
--- a/packages/api/src/errors.ts
+++ b/packages/api/src/errors.ts
@@ -33,7 +33,7 @@ export class ApiError extends Error {
/**
* Add additional data to the output of the error
*/
- toString(): string {
+ override toString(): string {
let string_ = super.toString();
// add additional data
diff --git a/packages/collection-utils/src/group-by.ts b/packages/collection-utils/src/group-by.ts
index 6723f7db..01aa34f0 100644
--- a/packages/collection-utils/src/group-by.ts
+++ b/packages/collection-utils/src/group-by.ts
@@ -20,7 +20,7 @@ export function groupBy(collection: T[], group: (item: T) => string | undefin
return collection.reduce((accumulator: Record, item) => {
const key = group(item) ?? '';
accumulator[key] = accumulator[key] ?? [];
- accumulator[key].push(item);
+ accumulator[key]!.push(item);
return accumulator;
}, {});
}
diff --git a/packages/collection-utils/src/shuffle.ts b/packages/collection-utils/src/shuffle.ts
index 1c053c85..72f15b9f 100644
--- a/packages/collection-utils/src/shuffle.ts
+++ b/packages/collection-utils/src/shuffle.ts
@@ -21,7 +21,7 @@ export function shuffle(array: T[]): T[] {
const out = [];
while (copy.length > 0) {
- out.push(copy.splice(Math.floor(Math.random() * copy.length), 1)[0]);
+ out.push(copy.splice(Math.floor(Math.random() * copy.length), 1)[0]!);
}
return out;
diff --git a/packages/collection-utils/src/zip.ts b/packages/collection-utils/src/zip.ts
index f17e89f1..d1ca814e 100644
--- a/packages/collection-utils/src/zip.ts
+++ b/packages/collection-utils/src/zip.ts
@@ -17,5 +17,5 @@
* Zip two arrays together.
*/
export function zip(a: T[], b: U[]): [T, U][] {
- return a.map((_, i) => [a[i], b[i]]);
+ return a.map((_, i) => [a[i]!, b[i]!]);
}
diff --git a/packages/core-tools/src/app.ts b/packages/core-tools/src/app.ts
index 15f242e6..2bbca072 100644
--- a/packages/core-tools/src/app.ts
+++ b/packages/core-tools/src/app.ts
@@ -60,11 +60,11 @@ commander
// get information about routes
const routes = await gatherRouteInformation(sourcePath);
- routes.sort((a, b) => a.route.urlPath.localeCompare(b.route.urlPath));
+ routes.sort((a, b) => a.route['urlPath'].localeCompare(b.route['urlPath']));
// change url path parameters to openapi notation
for (const routeWithMetaInformation of routes) {
- routeWithMetaInformation.route.urlPath = routeWithMetaInformation.route.urlPath.replaceAll(
+ routeWithMetaInformation.route['urlPath'] = routeWithMetaInformation.route['urlPath'].replaceAll(
/:\w+/g,
(match: string) => `{${match.replace(':', '')}}`,
);
@@ -72,7 +72,7 @@ commander
// keep openapi tags for routes that actually share url fragments
let tagsToKeep = routes.map(routeWithMetaInformation =>
- capitalize(routeWithMetaInformation.route.urlPath.split('/')[1]),
+ capitalize(routeWithMetaInformation.route['urlPath'].split('/')[1]),
);
tagsToKeep = tagsToKeep.filter(
(element, i, array) => array.indexOf(element) === i && array.lastIndexOf(element) !== i,
@@ -83,9 +83,9 @@ commander
// generate documentation for all routes
for (const routeWithMetaInformation of routes) {
- routeWithMetaInformation.tags = [capitalize(routeWithMetaInformation.route.urlPath.split('/')[1])];
+ routeWithMetaInformation.tags = [capitalize(routeWithMetaInformation.route['urlPath'].split('/')[1])];
- output.paths[routeWithMetaInformation.route.urlPath] = generateOpenAPIForRoute(
+ output.paths[routeWithMetaInformation.route['urlPath']] = generateOpenAPIForRoute(
routeWithMetaInformation,
path.relative(relativeOutDirectoryPath, outDirectorySchemasPath),
tagsToKeep,
@@ -165,7 +165,7 @@ commander
continue;
}
- unexpected = unexpected || errorsPerFile[file].some(error => !error.expected);
+ unexpected = unexpected || errorsPerFile[file]?.some(error => !error.expected) || false;
}
if (relativeReportPath !== undefined) {
diff --git a/packages/core-tools/src/routes.ts b/packages/core-tools/src/routes.ts
index 40be6b98..2fe7fb38 100644
--- a/packages/core-tools/src/routes.ts
+++ b/packages/core-tools/src/routes.ts
@@ -48,7 +48,7 @@ export async function gatherRouteInformation(path: string): Promise
+ instantiatedRoute['errorNames'].map(async (error: any) =>
// eslint-disable-next-line @typescript-eslint/ban-types
Object.assign((await project.instantiateDefinitionByName(error.name)) as object, {
name: error.name,
@@ -57,10 +57,10 @@ export async function gatherRouteInformation(path: string): Promise tagsToKeep.includes(value)),
};
- openapiPath[route.method.toLowerCase() as OpenAPIV3.HttpMethods]!.responses![route.statusCodeSuccess] = {
+ openapiPath[route['method'].toLowerCase() as OpenAPIV3.HttpMethods]!.responses![
+ route['statusCodeSuccess']
+ ] = {
description: route.responseBodyDescription,
content: {
'application/json': {
schema: {
- $ref: path.join(outDirectorySchemasPath, `${route.responseBodyName}.json`),
+ $ref: path.join(outDirectorySchemasPath, `${route['responseBodyName']}.json`),
},
},
},
};
for (const error of route.errors) {
- openapiPath[route.method.toLowerCase() as OpenAPIV3.HttpMethods]!.responses![error.statusCode] = {
+ openapiPath[route['method'].toLowerCase() as OpenAPIV3.HttpMethods]!.responses![error.statusCode] = {
description:
error.message ?? capitalize(error.name.replaceAll(/([A-Z][a-z])/g, ' $1').replace('SC ', '')),
content: {
@@ -142,8 +144,8 @@ export function generateOpenAPIForRoute(
};
}
- if (typeof route.obligatoryParameters === 'object') {
- for (const [parameter, schemaDefinition] of Object.entries(route.obligatoryParameters)) {
+ if (typeof route['obligatoryParameters'] === 'object') {
+ for (const [parameter, schemaDefinition] of Object.entries(route['obligatoryParameters'])) {
const openapiParameter: OpenAPIV3.ParameterObject = {
in: 'path',
name: parameter,
@@ -153,7 +155,7 @@ export function generateOpenAPIForRoute(
$ref: `schema/SCSearchResponse.json#/definitions/${schemaDefinition}`,
},
};
- openapiPath[route.method.toLowerCase() as OpenAPIV3.HttpMethods]?.parameters?.push(openapiParameter);
+ openapiPath[route['method'].toLowerCase() as OpenAPIV3.HttpMethods]?.parameters?.push(openapiParameter);
}
}
diff --git a/packages/core-tools/src/uml/create-diagram.ts b/packages/core-tools/src/uml/create-diagram.ts
index c1fa949a..ab4d712d 100644
--- a/packages/core-tools/src/uml/create-diagram.ts
+++ b/packages/core-tools/src/uml/create-diagram.ts
@@ -194,7 +194,7 @@ function createPlantUMLCodeForClass(config: UMLConfig, readerClass: LightweightC
if (config.showProperties && readerClass.properties) {
for (const key in readerClass.properties) {
const property = readerClass.properties[key];
- if (property.optional && !config.showOptionalProperties) {
+ if (property?.optional && !config.showOptionalProperties) {
// don't show optional attributes
continue;
}
@@ -202,7 +202,7 @@ function createPlantUMLCodeForClass(config: UMLConfig, readerClass: LightweightC
// don't show inherited properties
continue;
}*/
- model += `\n\t${createPropertyLine(property)}`;
+ model += `\n\t${createPropertyLine(property!)}`;
}
}
@@ -213,13 +213,13 @@ function createPlantUMLCodeForClass(config: UMLConfig, readerClass: LightweightC
if (readerClass.properties) {
for (const key in readerClass.properties) {
const property = readerClass.properties[key];
- const types: string[] = getReferenceTypes(property.type);
+ const types: string[] = getReferenceTypes(property!.type);
for (const type of types) {
if (config.showAssociations) {
/*if (property.inherited && !config.showInheritedProperties) {
continue;
}*/
- model += `${readerClass.name} -up-> ${type} : ${property.name} >\n`;
+ model += `${readerClass.name} -up-> ${type} : ${property!.name} >\n`;
}
}
}
diff --git a/packages/core-tools/src/validate.ts b/packages/core-tools/src/validate.ts
index 77953563..edf4947d 100644
--- a/packages/core-tools/src/validate.ts
+++ b/packages/core-tools/src/validate.ts
@@ -111,7 +111,7 @@ export class Validator {
}
// schema will be cached
- return this.ajvValidateWrapper(this.schemas[schema], instance);
+ return this.ajvValidateWrapper(this.schemas[schema]!, instance);
}
return this.ajvValidateWrapper(schema, instance);
@@ -147,7 +147,7 @@ function fromAjvResult(
const error: ValidationError = {
dataPath: ajvError.instancePath,
instance: instance,
- message: betterErrorObject?.[index]?.error ?? ajvError.message,
+ message: betterErrorObject?.[index]?.error ?? ajvError.message!,
name: ajvError.keyword,
schemaPath: ajvError.schemaPath,
suggestion: betterErrorObject?.[index]?.suggestion,
@@ -223,7 +223,7 @@ export async function validateFiles(
}
// add error to list of errors
- errors[testFileName].push({
+ errors[testFileName]?.push({
...error,
expected,
});
@@ -234,7 +234,7 @@ export async function validateFiles(
for (const error of expectedErrors) {
await Logger.error(`Extraneous expected error '${error}' in ${testFile}.`);
- errors[testFileName].push({
+ errors[testFileName]?.push({
dataPath: 'undefined',
expected: false,
instance: undefined,
@@ -279,7 +279,7 @@ export async function writeReport(reportPath: PathLike, errors: ExpectedValidati
let fileOutput = '';
- for (const [index, error] of errors[fileName].entries()) {
+ for (const [index, error] of errors[fileName]!.entries()) {
fileOutput += mustache.render(errorTemplate, {
idx: index + 1,
instance: JSON.stringify(error.instance, undefined, 2),
diff --git a/packages/core/src/guards.ts b/packages/core/src/guards.ts
index 91d333a8..0c69fdf0 100644
--- a/packages/core/src/guards.ts
+++ b/packages/core/src/guards.ts
@@ -102,14 +102,14 @@ export function isSearchResponse(something: unknown): something is SCSearchRespo
const somethingObject = something as {[key: string]: {[key: string]: string}};
return (
- Array.isArray(somethingObject.data) &&
- Array.isArray(somethingObject.facets) &&
- somethingObject.pagination !== undefined &&
- typeof somethingObject.pagination.count === 'number' &&
- typeof somethingObject.pagination.offset === 'number' &&
- typeof somethingObject.pagination.total === 'number' &&
- somethingObject.stats !== undefined &&
- typeof somethingObject.stats.time === 'number'
+ Array.isArray(somethingObject['data']) &&
+ Array.isArray(somethingObject['facets']) &&
+ somethingObject['pagination'] !== undefined &&
+ typeof somethingObject['pagination']['count'] === 'number' &&
+ typeof somethingObject['pagination']['offset'] === 'number' &&
+ typeof somethingObject['pagination']['total'] === 'number' &&
+ somethingObject['stats'] !== undefined &&
+ typeof somethingObject['stats']['time'] === 'number'
);
}
diff --git a/packages/core/src/things/abstract/academic-degree.ts b/packages/core/src/things/abstract/academic-degree.ts
index 7e0b2272..009ca393 100644
--- a/packages/core/src/things/abstract/academic-degree.ts
+++ b/packages/core/src/things/abstract/academic-degree.ts
@@ -55,7 +55,7 @@ export class SCAcademicDegreeMeta extends SCThingMeta implements SCMetaTranslati
/**
* Translations of fields
*/
- fieldTranslations = {
+ override fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
academicDegree: 'Abschlussgrad',
@@ -73,7 +73,7 @@ export class SCAcademicDegreeMeta extends SCThingMeta implements SCMetaTranslati
/**
* Translations of values of fields
*/
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},
diff --git a/packages/core/src/things/abstract/academic-term.ts b/packages/core/src/things/abstract/academic-term.ts
index 17452619..f7ac78a0 100644
--- a/packages/core/src/things/abstract/academic-term.ts
+++ b/packages/core/src/things/abstract/academic-term.ts
@@ -67,7 +67,7 @@ export class SCAcademicTermWithoutReferencesMeta extends SCThingMeta implements
/**
* Translations of fields
*/
- fieldTranslations = {
+ override fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
acronym: 'Akronym',
@@ -89,7 +89,7 @@ export class SCAcademicTermWithoutReferencesMeta extends SCThingMeta implements
/**
* Translations of values of fields
*/
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},
diff --git a/packages/core/src/things/abstract/creative-work.ts b/packages/core/src/things/abstract/creative-work.ts
index 4c9cd65f..8132edbc 100644
--- a/packages/core/src/things/abstract/creative-work.ts
+++ b/packages/core/src/things/abstract/creative-work.ts
@@ -124,7 +124,7 @@ export class SCCreativeWorkMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of fields
*/
- fieldTranslations = {
+ override fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
name: 'Titel',
@@ -162,7 +162,7 @@ export class SCCreativeWorkMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of values of fields
*/
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
},
diff --git a/packages/core/src/things/abstract/event.ts b/packages/core/src/things/abstract/event.ts
index ab54ca07..219dc946 100644
--- a/packages/core/src/things/abstract/event.ts
+++ b/packages/core/src/things/abstract/event.ts
@@ -79,7 +79,7 @@ export class SCEventMeta extends SCThingMeta implements SCMetaTranslations().fieldValueTranslations.de,
diff --git a/packages/core/src/things/assessment.ts b/packages/core/src/things/assessment.ts
index 3fbc1128..a025383a 100644
--- a/packages/core/src/things/assessment.ts
+++ b/packages/core/src/things/assessment.ts
@@ -120,7 +120,7 @@ export class SCAssessmentMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of fields
*/
- fieldTranslations = {
+ override fieldTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCAssessmentCategories,
@@ -152,7 +152,7 @@ export class SCAssessmentMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of values of fields
*/
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCThingWithCategoriesWithoutReferencesMeta<
SCAssessmentCategories,
diff --git a/packages/core/src/things/book.ts b/packages/core/src/things/book.ts
index 78b9ff38..6c829777 100644
--- a/packages/core/src/things/book.ts
+++ b/packages/core/src/things/book.ts
@@ -131,7 +131,7 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations {
- fieldTranslations = {
+ override fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
@@ -101,7 +101,7 @@ export class SCCertificationMeta extends SCThingMeta implements SCMetaTranslatio
},
};
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta<
diff --git a/packages/core/src/things/contact-point.ts b/packages/core/src/things/contact-point.ts
index 5a9147ef..23af335d 100644
--- a/packages/core/src/things/contact-point.ts
+++ b/packages/core/src/things/contact-point.ts
@@ -83,7 +83,7 @@ export class SCContactPointMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of fields
*/
- fieldTranslations = {
+ override fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
areaServed: 'Arbeitsraum',
@@ -107,7 +107,7 @@ export class SCContactPointMeta extends SCThingMeta implements SCMetaTranslation
/**
* Translations of values of fields
*/
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
type: 'Kontaktinformation',
diff --git a/packages/core/src/things/course-of-study.ts b/packages/core/src/things/course-of-study.ts
index 2fc9f7fb..d55c05a3 100644
--- a/packages/core/src/things/course-of-study.ts
+++ b/packages/core/src/things/course-of-study.ts
@@ -112,7 +112,7 @@ export class SCCourseOfStudyMeta extends SCThingMeta implements SCMetaTranslatio
/**
* Translations of fields
*/
- fieldTranslations = {
+ override fieldTranslations = {
de: {
...new SCAcademicDegreeMeta().fieldTranslations.de,
...new SCThingThatCanBeOfferedMeta().fieldTranslations.de,
@@ -138,7 +138,7 @@ export class SCCourseOfStudyMeta extends SCThingMeta implements SCMetaTranslatio
/**
* Translations of values of fields
*/
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCAcademicDegreeMeta().fieldValueTranslations.de,
modes: {
diff --git a/packages/core/src/things/date-series.ts b/packages/core/src/things/date-series.ts
index 4f759483..835a9cb1 100644
--- a/packages/core/src/things/date-series.ts
+++ b/packages/core/src/things/date-series.ts
@@ -112,7 +112,7 @@ export class SCDateSeriesMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of fields
*/
- fieldTranslations = {
+ override fieldTranslations = {
de: {
...new SCThingInPlaceMeta().fieldTranslations.de,
...new SCThingThatCanBeOfferedMeta().fieldTranslations.de,
@@ -138,7 +138,7 @@ export class SCDateSeriesMeta extends SCThingMeta implements SCMetaTranslations<
/**
* Translations of values of fields
*/
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCThingInPlaceMeta().fieldValueTranslations.de,
...new SCThingThatCanBeOfferedMeta().fieldValueTranslations.de,
diff --git a/packages/core/src/things/diff.ts b/packages/core/src/things/diff.ts
index b5311e0d..f461831c 100644
--- a/packages/core/src/things/diff.ts
+++ b/packages/core/src/things/diff.ts
@@ -66,7 +66,7 @@ export class SCDiffMeta extends SCThingMeta implements SCMetaTranslations().fieldTranslations.de,
@@ -172,7 +172,7 @@ export class SCStudyModuleMeta extends SCThingMeta implements SCMetaTranslations
/**
* Translations of values of fields
*/
- fieldValueTranslations = {
+ override fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
...new SCThingThatCanBeOfferedMeta().fieldValueTranslations.de,
diff --git a/packages/core/src/things/ticket.ts b/packages/core/src/things/ticket.ts
index 67cacc64..80e8dec3 100644
--- a/packages/core/src/things/ticket.ts
+++ b/packages/core/src/things/ticket.ts
@@ -62,7 +62,7 @@ export class SCTicketMeta extends SCThingMeta implements SCMetaTranslations()
.fieldTranslations.de,
@@ -106,7 +106,7 @@ export class SCToDoMeta extends SCThingMeta implements SCMetaTranslations()
.fieldValueTranslations.de,
diff --git a/packages/core/src/things/tour.ts b/packages/core/src/things/tour.ts
index 3dde7d12..1a3d8f43 100644
--- a/packages/core/src/things/tour.ts
+++ b/packages/core/src/things/tour.ts
@@ -56,7 +56,7 @@ export class SCTourMeta extends SCThingMeta implements SCMetaTranslations().fieldTranslations.de,
@@ -190,7 +190,7 @@ export class SCVideoMeta extends SCThingMeta implements SCMetaTranslations().fieldValueTranslations.de,
diff --git a/packages/core/src/translator.ts b/packages/core/src/translator.ts
index dd5b15f0..570ba003 100644
--- a/packages/core/src/translator.ts
+++ b/packages/core/src/translator.ts
@@ -76,7 +76,7 @@ export class SCThingTranslator {
this.metaClasses = SCClasses;
// Initalize all meta classes once
- if (typeof (this.metaClasses as any)[Object.keys(this.metaClasses)[0]] === 'function') {
+ if (typeof (this.metaClasses as any)[Object.keys(this.metaClasses)[0]!] === 'function') {
for (const metaClass of Object.keys(this.metaClasses)) {
(this.metaClasses as any)[metaClass] = new (SCClasses as any)[metaClass]();
}
diff --git a/packages/easy-ast/src/easy-ast.ts b/packages/easy-ast/src/easy-ast.ts
index a8f6be26..190061a0 100644
--- a/packages/easy-ast/src/easy-ast.ts
+++ b/packages/easy-ast/src/easy-ast.ts
@@ -149,8 +149,8 @@ class LightweightDefinitionBuilder {
indexSignature.type,
),
indexSignatureType: this.lightweightTypeFromType(
- this.typeChecker.getTypeFromTypeNode(indexSignature.parameters[0].type!),
- indexSignature.parameters[0].type!,
+ this.typeChecker.getTypeFromTypeNode(indexSignature.parameters[0]?.type!),
+ indexSignature.parameters[0]?.type!,
),
}),
),
@@ -253,6 +253,6 @@ class LightweightDefinitionBuilder {
* Same as conversion, but generates a simple list of all definitions.
*/
convertToList(): LightweightDefinition[] {
- return Object.values(this.convert()).flatMap(it => it.values);
+ return Object.values(this.convert()).flatMap(it => it['values']!);
}
}
diff --git a/packages/gitlab-api/environment.d.ts b/packages/gitlab-api/environment.d.ts
new file mode 100644
index 00000000..9bbee1d0
--- /dev/null
+++ b/packages/gitlab-api/environment.d.ts
@@ -0,0 +1,9 @@
+declare global {
+ namespace NodeJS {
+ interface ProcessEnv {
+ GITLAB_PRIVATE_TOKEN?: string;
+ }
+ }
+}
+
+export {};
diff --git a/packages/logger/environment.d.ts b/packages/logger/environment.d.ts
new file mode 100644
index 00000000..5dc121ad
--- /dev/null
+++ b/packages/logger/environment.d.ts
@@ -0,0 +1,24 @@
+declare global {
+ namespace NodeJS {
+ interface ProcessEnv {
+ /**
+ * If set to true, invalid smtp configs will not throw an error
+ */
+ ALLOW_NO_TRANSPORT?: 'true' | string;
+ SMTP_AUTH_USER?: string;
+ SMTP_AUTH_PASSWORD?: string;
+ SMTP_SENDER_MAIL?: string;
+ SMTP_SENDER_NAME?: string;
+ SMTP_HOST?: string;
+ SMTP_PORT?: string;
+ SMTP_CC?: string;
+ SMTP_RECIPIENTS?: string;
+ SMTP_SECURE?: 'true' | string;
+ STAPPS_LOG_LEVEL?: string;
+ STAPPS_EXIT_LEVEL?: string;
+ NODE_ENV?: string;
+ }
+ }
+}
+
+export {};