mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 21:24:26 +08:00
We had our own homegrown ESLint rule that was trying to enforce some consistency around `ReadonlyArray<T>` vs. `readonly T[]`, but that was fairly limited and still allowed for `Array<T>` vs `T[]` with no shared discipline. We now use the `@typescript-eslint/array-type` rule instead and enforce that for simple types the `T[]` (and `readonly T[]`) syntax is used, while for complex types the `Array<A & B>` (and `ReadonlyArray<A & B>`) syntax is used. Bug: none Change-Id: I8933869f98577d4afc4141c5736fccb2159924a6 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6257990 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
32 lines
821 B
TypeScript
32 lines
821 B
TypeScript
// 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.
|
|
|
|
export interface DOMPinnedWebIDLProp {
|
|
global?: boolean;
|
|
specs?: number;
|
|
rules?: DOMPinnedWebIDLRule[];
|
|
}
|
|
|
|
export interface DOMPinnedWebIDLType {
|
|
inheritance?: string;
|
|
includes?: string[];
|
|
props?: {
|
|
[PropName: string]: DOMPinnedWebIDLProp,
|
|
};
|
|
rules?: DOMPinnedWebIDLRule[];
|
|
}
|
|
|
|
export interface DOMPinnedWebIDLRule {
|
|
when: string;
|
|
is: string;
|
|
}
|
|
|
|
export interface JavaScriptMetaData {
|
|
signaturesForNativeFunction(name: string): string[][]|null;
|
|
|
|
signaturesForInstanceMethod(name: string, receiverClassName: string): string[][]|null;
|
|
|
|
signaturesForStaticMethod(name: string, receiverConstructorName: string): string[][]|null;
|
|
}
|