chore: Enforce interfaces for object types (#2544)
This commit is contained in:
committed by
dermotduffy
parent
c8e7fdd808
commit
a87e5b8eeb
@@ -64,6 +64,7 @@ export default defineConfig([
|
||||
rules: {
|
||||
curly: 'error',
|
||||
'local/no-em-dash': 'error',
|
||||
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
'@typescript-eslint/no-non-null-assertion': 'error',
|
||||
'@typescript-eslint/parameter-properties': 'error',
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { CameraConfig } from '../../../config/schema/cameras';
|
||||
import { Endpoint } from '../../../types';
|
||||
|
||||
type EndpointOptions = {
|
||||
interface EndpointOptions {
|
||||
url?: string;
|
||||
stream?: string;
|
||||
};
|
||||
}
|
||||
|
||||
const buildGo2RTCEndpoint = (
|
||||
cameraConfig: CameraConfig,
|
||||
|
||||
@@ -3,7 +3,9 @@ export type EffectComponent = HTMLElement & {
|
||||
startFadeOut(): Promise<void>;
|
||||
};
|
||||
|
||||
export type EffectModule = { default: new () => EffectComponent };
|
||||
export interface EffectModule {
|
||||
default: new () => EffectComponent;
|
||||
}
|
||||
|
||||
export interface EffectOptions {
|
||||
fadeIn?: boolean;
|
||||
|
||||
@@ -29,10 +29,10 @@ type RenderRoot = HTMLElement;
|
||||
* start the video.
|
||||
*/
|
||||
|
||||
type MediaActionsTarget = {
|
||||
interface MediaActionsTarget {
|
||||
selected: boolean;
|
||||
index: number;
|
||||
};
|
||||
}
|
||||
|
||||
export class MediaActionsController {
|
||||
private _options: MediaActionsControllerOptions | null = null;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { LitElement } from 'lit';
|
||||
|
||||
export type ConstructableLitElement = { new (...args: unknown[]): LitElement };
|
||||
export interface ConstructableLitElement {
|
||||
new (...args: unknown[]): LitElement;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user