forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
52 lines (45 loc) · 1.77 KB
/
types.ts
File metadata and controls
52 lines (45 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { JSONObject } from '@phosphor/coreutils';
import { SharedMessages } from '../messages';
import { IJupyterVariable } from '../types';
export const CellFetchAllLimit = 100000;
export const CellFetchSizeFirst = 100000;
export const CellFetchSizeSubsequent = 1000000;
export const MaxStringCompare = 200;
export const ColumnWarningSize = 1000; // Anything over this takes too long to load
export namespace DataViewerRowStates {
export const Fetching = 'fetching';
export const Skipped = 'skipped';
}
export namespace DataViewerMessages {
export const Started = SharedMessages.Started;
export const UpdateSettings = SharedMessages.UpdateSettings;
export const InitializeData = 'init';
export const GetAllRowsRequest = 'get_all_rows_request';
export const GetAllRowsResponse = 'get_all_rows_response';
export const GetRowsRequest = 'get_rows_request';
export const GetRowsResponse = 'get_rows_response';
export const CompletedData = 'complete';
}
export interface IGetRowsRequest {
start: number;
end: number;
}
export interface IGetRowsResponse {
rows: JSONObject;
start: number;
end: number;
}
// Map all messages to specific payloads
export type IDataViewerMapping = {
[DataViewerMessages.Started]: never | undefined;
[DataViewerMessages.UpdateSettings]: string;
[DataViewerMessages.InitializeData]: IJupyterVariable;
[DataViewerMessages.GetAllRowsRequest]: never | undefined;
[DataViewerMessages.GetAllRowsResponse]: JSONObject;
[DataViewerMessages.GetRowsRequest]: IGetRowsRequest;
[DataViewerMessages.GetRowsResponse]: IGetRowsResponse;
[DataViewerMessages.CompletedData]: never | undefined;
};