typescript: Move js/js_typings/zulip/index.d.ts to js/global.d.ts.

The js_typings directory is not set up correctly for us to add new
type declarations for untyped external modules.  The correct
configuration would be something like

{
    "compilerOptions": {
        "baseUrl": ".",
        "paths": {
            "*": ["js_typings/*"],
        },
        "typeRoots": ["js_typings"],
    },
    "exclude": [
        "js_typings",
    ],
}

but that configuration is incompatible with using the same directory
for _internal_ modules like the ones declared here.

Also, correct some mistakes the generation of this list.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-10-29 17:08:38 -07:00 committed by Tim Abbott
parent 8654af367d
commit 98676f5a1f
2 changed files with 22 additions and 20 deletions

View File

@ -1,10 +1,21 @@
// These declarations tell the TypeScript compiler about the existence
// of the global variables for our untyped JavaScript modules. Please
// remove each declaration when the corresponding module is migrated
// to TS.
declare var FetchStatus: any;
declare var Filter: any;
declare var LightboxCanvas: any;
declare var MessageListData: any;
declare var MessageListView: any;
declare var Socket: any;
declare var activity: any;
declare var admin: any;
declare var alert_words: any;
declare var alert_words_ui: any;
declare var archive: any;
declare var attachments_ui: any;
declare var avatar: any;
declare var billing: any;
declare var blueslip: any;
declare var bot_data: any;
declare var buddy_data: any;
@ -15,18 +26,18 @@ declare var color_data: any;
declare var colorspace: any;
declare var common: any;
declare var components: any;
declare var compose: any;
declare var compose_actions: any;
declare var composebox_typeahead: any;
declare var compose_fade: any;
declare var compose: any;
declare var compose_pm_pill: any;
declare var compose_state: any;
declare var compose_ui: any;
declare var condense: any;
declare var confirm_dialog: any;
declare var copy_and_paste: any;
declare var csrf: any;
declare var debug: any;
declare var csrf_token: any;
declare var current_msg_list: any;
declare var drafts: any;
declare var echo: any;
declare var emoji: any;
@ -35,20 +46,20 @@ declare var favicon: any;
declare var feature_flags: any;
declare var feedback_widget: any;
declare var fenced_code: any;
declare var fetch_status: any;
declare var filter: any;
declare var floating_recipient_bar: any;
declare var gear_menu: any;
declare var hashchange: any;
declare var hash_util: any;
declare var helpers: any;
declare var home_msg_list: any;
declare var hotkey: any;
declare var hotspots: any;
declare var i18n: any;
declare var info_overlay: any;
declare var input_pill: any;
declare var integration_bot_widget: any;
declare var invite: any;
declare var keydown_util: any;
declare var lightbox_canvas: any;
declare var lightbox: any;
declare var list_cursor: any;
declare var list_render: any;
@ -61,9 +72,7 @@ declare var message_edit: any;
declare var message_events: any;
declare var message_fetch: any;
declare var message_flags: any;
declare var message_list_data: any;
declare var message_list: any;
declare var message_list_view: any;
declare var message_live_update: any;
declare var message_scroll: any;
declare var message_store: any;
@ -106,15 +115,15 @@ declare var search_pill_widget: any;
declare var search_suggestion: any;
declare var search_util: any;
declare var sent_messages: any;
declare var server_events_dispatch: any;
declare var server_events: any;
declare var server_events_dispatch: any;
declare var settings: any;
declare var settings_account: any;
declare var settings_bots: any;
declare var settings_display: any;
declare var settings_emoji: any;
declare var settings_exports: any;
declare var settings_invites: any;
declare var settings: any;
declare var settings_linkifiers: any;
declare var settings_muting: any;
declare var settings_notifications: any;
@ -127,8 +136,6 @@ declare var settings_toggle: any;
declare var settings_ui: any;
declare var settings_user_groups: any;
declare var settings_users: any;
declare var setup: any;
declare var socket: any;
declare var starred_messages: any;
declare var stream_color: any;
declare var stream_create: any;
@ -152,20 +159,19 @@ declare var topic_generator: any;
declare var topic_list: any;
declare var topic_zoom: any;
declare var top_left_corner: any;
declare var translations: any;
declare var transmit: any;
declare var tutorial: any;
declare var typeahead_helper: any;
declare var typing: any;
declare var typing_data: any;
declare var typing_events: any;
declare var typing: any;
declare var ui_init: any;
declare var ui: any;
declare var ui_report: any;
declare var ui_util: any;
declare var unread: any;
declare var unread_ops: any;
declare var unread_ui: any;
declare var upgrade: any;
declare var upload: any;
declare var upload_widget: any;
declare var user_events: any;
@ -178,4 +184,3 @@ declare var util: any;
declare var widgetize: any;
declare var zcommand: any;
declare var zform: any;
declare var zulip: any;

View File

@ -1,3 +0,0 @@
The `index.d.ts` type definition in `js_typings/zulip` directory is to simply
tell the TypeScript compiler about the existence of our untyped JavaScript
modules. **Please remove each module declaration when it is migrated to TS.**