diff --git a/compiler/src/component_map.ts b/compiler/src/component_map.ts index f99de2a420ca86c910390402eda55224808c4160..3527b3e6df65aaabca5362831d3d361e9bf30ceb 100644 --- a/compiler/src/component_map.ts +++ b/compiler/src/component_map.ts @@ -80,7 +80,7 @@ function addExternalComponents(): void { } else { COMPONENT_MAP[extCompName] = EXTERNAL_COMPONENT_MAP[extCompName]; } - }) + }); } export const TRANSITION_COMMON_ATTRS: Set = new Set([ @@ -153,7 +153,7 @@ export const CUSTOM_BUILDER_PROPERTIES: Set = new Set(['background', 'bi export const CUSTOM_BUILDER_PROPERTIES_WITHOUTKEY: Set = new Set(['showUnit', 'create']); export const CUSTOM_BUILDER_CONSTRUCTORS: Set = new Set(['MenuItem', 'MenuItemGroup', 'Refresh', 'WaterFlow', 'Radio', 'Checkbox']); -(function initComponent() { +(function initComponent(): void { Object.keys(COMPONENT_MAP).forEach((componentName) => { INNER_COMPONENT_NAMES.add(componentName); JS_BIND_COMPONENTS.add(componentName); diff --git a/compiler/src/external_component_map.ts b/compiler/src/external_component_map.ts index 89b4f09241ff50b21c51dfa39dc9894bbfb37fdb..8e05675edb0c12afc65463dde5ce243e576e511a 100644 --- a/compiler/src/external_component_map.ts +++ b/compiler/src/external_component_map.ts @@ -31,7 +31,7 @@ export function readExternalComponents(): object { return EXT_COMPONENT_MAP; } for (const componentPath of componentPaths) { - if(!fs.existsSync(componentPath)){ + if (!fs.existsSync(componentPath)) { continue; } const files: string[] = fs.readdirSync(componentPath); diff --git a/compiler/src/performance.ts b/compiler/src/performance.ts index fea60b4ceb4865cd1c0af7fd0a51ba791111010a..9b8e99707f00b3df0c7ad3fc53401b18aa8996a0 100644 --- a/compiler/src/performance.ts +++ b/compiler/src/performance.ts @@ -105,7 +105,7 @@ export function processExternalEvents(projectConfig: Object, eventType: number, const isTsc: boolean = isTscEvents(eventType); const { parentEvent, filePath } = externalEventsInfo; let events: Event[] = isTsc ? ts.PerformanceDotting.getEventData() : - (fs.existsSync(filePath) ? JSON.parse(fs.readFileSync(filePath, 'utf-8')): []); + (fs.existsSync(filePath) ? JSON.parse(fs.readFileSync(filePath, 'utf-8')) : []); if (events && events.length) { events = events.sort((a, b) => a.startTime - b.startTime); asyncEvents.set(isTsc ? events[0].parentId : events[0].parentEvent, parentEvent); @@ -127,7 +127,7 @@ function setTotalTime(event: Event, isTsc: boolean): void { subEvent.start(); subEvent.stop(); subEvent.setTotalTime(event.duration); - asyncEvents.set(isTsc ? event.id : event.name, subEvent) + asyncEvents.set(isTsc ? event.id : event.name, subEvent); } }