Files
react-native-devtools-frontend/front_end/entrypoints/main/SimpleApp.ts
T
Tim van der Lippe 877f04aa0e Remove eslint-disable statements from type imports
We no longer use the no-unused-vars and instead use the version
of typescript-eslint. The latter can properly detect unused
type-import usages. Therefore, we can remove the eslint-disable
statements, which are essentially noops.

This CL is the result of replacing

```
import type (.*) // eslint-disable-line no-unused-vars
```

with

```
import type $1
```

R=jacktfranklin@chromium.org

Bug: none
Change-Id: I141edcb7125e414c405760af1e4058bfdc6e30f3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3048473
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-26 12:53:27 +00:00

35 lines
1.0 KiB
TypeScript

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import type * as Common from '../../core/common/common.js';
import * as UI from '../../ui/legacy/legacy.js';
export class SimpleApp implements Common.App.App {
presentUI(document: Document): void {
const rootView = new UI.RootView.RootView();
UI.InspectorView.InspectorView.instance().show(rootView.element);
rootView.attachToDocument(document);
rootView.focus();
}
}
let simpleAppProviderInstance: SimpleAppProvider;
export class SimpleAppProvider implements Common.AppProvider.AppProvider {
static instance(opts: {
forceNew: boolean|null,
} = {forceNew: null}): SimpleAppProvider {
const {forceNew} = opts;
if (!simpleAppProviderInstance || forceNew) {
simpleAppProviderInstance = new SimpleAppProvider();
}
return simpleAppProviderInstance;
}
createApp(): Common.App.App {
return new SimpleApp();
}
}