config-loader: enable validation of required props in d.ts definitions + fix issues

This commit is contained in:
Patrik Oldsberg
2020-11-15 21:40:50 +01:00
parent feb9905a37
commit b8eba8219e
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ costInsights:
homepage:
clocks:
- label: UTC
timzone: UTC
timezone: UTC
- label: NYC
timezone: 'America/New_York'
- label: STO
+1 -1
View File
@@ -15,7 +15,7 @@
*/
export interface Config {
frontend: {
app: {
baseUrl: string; // defined in core, but repeated here without doc
};
@@ -150,7 +150,10 @@ function compileTsSchemas(currentDir: string, paths: string[]) {
// All schemas should export a `Config` symbol
'Config',
// This enables usage of @visibility is doc comments
{ validationKeywords: ['visibility'] },
{
required: true,
validationKeywords: ['visibility'],
},
[schemaFile],
) as JsonObject | null;