aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-11-01 16:17:46 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-11-01 16:17:46 +0100
commit44f8ae5ba2b6b4954d6562aff2f4e704cfa1a966 (patch)
treead2bb4386f402ca0201b997ea6aecd8b6c9f2d42 /static
parentlib. (diff)
downloadcalp-44f8ae5ba2b6b4954d6562aff2f4e704cfa1a966.tar.gz
calp-44f8ae5ba2b6b4954d6562aff2f4e704cfa1a966.tar.xz
Limit exports to those used by imports.
This gives a clearer picture of what is dead code and what isn't.
Diffstat (limited to 'static')
-rw-r--r--static/globals.ts16
-rw-r--r--static/lib.ts3
-rw-r--r--static/popup.ts4
-rw-r--r--static/types.ts5
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
}