From 1536d78fd6c61da0a83ff252d48db91292feea87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Valderrama?= Date: Mon, 4 Mar 2024 11:05:55 +0100 Subject: [PATCH] fix(parser): removed useless IdData type --- libs/plugins-data-parser/README.md | 2 +- .../src/lib/models/parsed.model.ts | 25 ++++++++----------- .../src/lib/utils/parse-arr.util.ts | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/libs/plugins-data-parser/README.md b/libs/plugins-data-parser/README.md index 3e50103..d3a2ce8 100644 --- a/libs/plugins-data-parser/README.md +++ b/libs/plugins-data-parser/README.md @@ -18,7 +18,7 @@ import { parse, ParsedFile } from 'plugins-parser'; [...] const parsedFile: ParsedFile = parse(file); -console.log(parsedFile.data.colors?.[0]?.data?.color); +console.log(parsedFile.data.colors?.[0]?.color); [...] ``` diff --git a/libs/plugins-data-parser/src/lib/models/parsed.model.ts b/libs/plugins-data-parser/src/lib/models/parsed.model.ts index 7586370..d997e3f 100644 --- a/libs/plugins-data-parser/src/lib/models/parsed.model.ts +++ b/libs/plugins-data-parser/src/lib/models/parsed.model.ts @@ -7,14 +7,14 @@ export interface ParsedData { export interface Data { id: string; version: number; - colors?: IdData[]; - typographies?: IdData[]; + colors?: Color[]; + typographies?: Typhography[]; pages?: RootTail; // Tail is an array of uuid (string) - pagesIndex?: IdData[]; - components?: IdData[]; - media?: IdData[]; - options?: IdData