Skip to content

Commit

Permalink
Fix typing for format2 schema imports
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed May 31, 2024
1 parent d82bf55 commit b647038
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions server/gx-workflow-ls-format2/src/schema/versions.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import schema_v19_09_workflows from "@schemas/gxformat2/v19_09/workflows.yaml";
import schema_common from "@schemas/gxformat2/common/common.yaml";
import schema_common_metaschema_base from "@schemas/gxformat2/common/metaschema/metaschema_base.yaml";
import schema_v19_09_process from "@schemas/gxformat2/v19_09/process.yaml";
import schema_common from "@schemas/gxformat2/common/common.yaml";
import schema_v19_09_workflows from "@schemas/gxformat2/v19_09/workflows.yaml";
import { SchemaDocument } from "./definitions";

/**
* All gxformat2 version 19_09 schema documents.
*
* These documents are raw yaml documents loaded by webpack.
* */
export const SCHEMA_DOCS_v19_09_MAP = new Map<string, SchemaDocument>([
[schema_common_metaschema_base.$base, schema_common_metaschema_base],
[schema_v19_09_process.$base, schema_v19_09_process],
[schema_common.$base, schema_common],
[schema_v19_09_workflows.$base, schema_v19_09_workflows],
]);
export const SCHEMA_DOCS_v19_09_MAP = new Map<string, SchemaDocument>(
[
schema_common_metaschema_base as SchemaDocument,
schema_v19_09_process as SchemaDocument,
schema_common as SchemaDocument,
schema_v19_09_workflows as SchemaDocument,
].map((schemaDoc) => [schemaDoc.$base, schemaDoc])
);
2 changes: 1 addition & 1 deletion server/gx-workflow-ls-format2/src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module "*.yaml" {
const data: any;
const data: unknown;
export default data;
}

0 comments on commit b647038

Please sign in to comment.