forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
37 lines (31 loc) · 1.11 KB
/
Copy pathindex.tsx
File metadata and controls
37 lines (31 loc) · 1.11 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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import './index.css';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { IVsCodeApi } from '../react-common/postOffice';
import { detectBaseTheme } from '../react-common/themeDetector';
import { getConnectedNativeEditor } from './nativeEditor';
import { createStore } from './redux/store';
// This special function talks to vscode from a web panel
export declare function acquireVsCodeApi(): IVsCodeApi;
const baseTheme = detectBaseTheme();
// Create the redux store
const store = createStore(
// tslint:disable-next-line: no-typeof-undefined
typeof acquireVsCodeApi !== 'undefined',
baseTheme,
false
);
// Wire up a connected react control for our NativeEditor
const ConnectedNativeEditor = getConnectedNativeEditor();
// Stick them all together
// tslint:disable:no-typeof-undefined
ReactDOM.render(
<Provider store={store}>
<ConnectedNativeEditor />
</Provider>,
document.getElementById('root') as HTMLElement
);