From 44f8ae5ba2b6b4954d6562aff2f4e704cfa1a966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 1 Nov 2021 16:17:46 +0100 Subject: Limit exports to those used by imports. This gives a clearer picture of what is dead code and what isn't. --- static/globals.ts | 16 +--------------- static/lib.ts | 3 +++ static/popup.ts | 4 +++- static/types.ts | 5 ++--- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/static/globals.ts b/static/globals.ts index 9045d4a9..c18808e7 100644 --- a/static/globals.ts +++ b/static/globals.ts @@ -1,19 +1,5 @@ export { - vcal_objects, - hasValue, - ComponentVEvent, - ComponentDescription, - popuplateTab, - ComponentEdit, - find_popup, - find_block, - ComponentBlock, - DateTimeInput, - verifySlot, - TabElement, - buildDescriptionList, - PopupElement, - wholeday_checkbox, + find_block, find_popup, PopupElement } import { close_popup, toggle_popup } from './popup' diff --git a/static/lib.ts b/static/lib.ts index fe5ef1bd..d8e881ac 100644 --- a/static/lib.ts +++ b/static/lib.ts @@ -9,6 +9,9 @@ export { General procedures which in theory could be used anywhere. */ +/* + * https://www.typescriptlang.org/docs/handbook/declaration-merging.html + */ declare global { interface Object { format: (fmt: string) => string diff --git a/static/popup.ts b/static/popup.ts index 3fb4ae54..90cb9e1c 100644 --- a/static/popup.ts +++ b/static/popup.ts @@ -1,5 +1,7 @@ import { find_block, find_popup, PopupElement } from './globals' -export { event_from_popup, popup_from_event, close_popup, close_all_popups, VIEW, open_popup, toggle_popup, activePopup } +export { event_from_popup, popup_from_event, close_popup, + close_all_popups, /* VIEW, */open_popup, toggle_popup, activePopup +} /* event component => coresponding popup component */ diff --git a/static/types.ts b/static/types.ts index 63d55e35..1cf77f51 100644 --- a/static/types.ts +++ b/static/types.ts @@ -1,7 +1,6 @@ export { - all_types, ical_type, property_names, - valid_fields, known_ical_types, - valid_input_types, tagname, + ical_type, + valid_input_types, JCalProperty, JCal } -- cgit v1.2.3