Files
react-native-devtools-frontend/front_end/protocol_client/protocol_client.js
T
Simon Zünd c385b48e5d Emit TypeScript enums in protocol.d.ts for Protocol enums
Instead of

    export type MixedContentType = ('blockable'|'...'|'none');

we know emit

    export enum MixedContentType {
      Blockable = 'blockable',
      OptionallyBlockable = 'optionally-blockable',
      None = 'none',
    }

This is necessary as existing JavaScript code accesses these
enums using

   Protocol.Security.MixedContentType.None

R=tvanderlippe@chromium.org

Bug: chromium:1011811
Change-Id: Id4bf2c1333affcdc4df37a43bf95379700e3e9d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2113373
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-23 15:17:31 +00:00

23 lines
798 B
JavaScript

// Copyright 2019 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 * as InspectorBackendCommands from '../generated/InspectorBackendCommands.js';
import * as InspectorBackend from './InspectorBackend.js';
import * as NodeURL from './NodeURL.js';
export {
InspectorBackend,
NodeURL,
};
// Create the global here because registering commands will involve putting
// items onto the global.
// @ts-ignore Global namespace instantiation
self.Protocol = self.Protocol || {};
// FIXME: This instance of InspectorBackend should not be a side effect of importing this module.
InspectorBackendCommands.registerCommands(InspectorBackend.inspectorBackend);
export const Protocol = self.Protocol;