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: {
|
rules: {
|
||||||
curly: 'error',
|
curly: 'error',
|
||||||
'local/no-em-dash': 'error',
|
'local/no-em-dash': 'error',
|
||||||
|
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
||||||
'@typescript-eslint/no-explicit-any': 'error',
|
'@typescript-eslint/no-explicit-any': 'error',
|
||||||
'@typescript-eslint/no-non-null-assertion': 'error',
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
||||||
'@typescript-eslint/parameter-properties': 'error',
|
'@typescript-eslint/parameter-properties': 'error',
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { CameraConfig } from '../../../config/schema/cameras';
|
import { CameraConfig } from '../../../config/schema/cameras';
|
||||||
import { Endpoint } from '../../../types';
|
import { Endpoint } from '../../../types';
|
||||||
|
|
||||||
type EndpointOptions = {
|
interface EndpointOptions {
|
||||||
url?: string;
|
url?: string;
|
||||||
stream?: string;
|
stream?: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
const buildGo2RTCEndpoint = (
|
const buildGo2RTCEndpoint = (
|
||||||
cameraConfig: CameraConfig,
|
cameraConfig: CameraConfig,
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ export type EffectComponent = HTMLElement & {
|
|||||||
startFadeOut(): Promise<void>;
|
startFadeOut(): Promise<void>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EffectModule = { default: new () => EffectComponent };
|
export interface EffectModule {
|
||||||
|
default: new () => EffectComponent;
|
||||||
|
}
|
||||||
|
|
||||||
export interface EffectOptions {
|
export interface EffectOptions {
|
||||||
fadeIn?: boolean;
|
fadeIn?: boolean;
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ type RenderRoot = HTMLElement;
|
|||||||
* start the video.
|
* start the video.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type MediaActionsTarget = {
|
interface MediaActionsTarget {
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
index: number;
|
index: number;
|
||||||
};
|
}
|
||||||
|
|
||||||
export class MediaActionsController {
|
export class MediaActionsController {
|
||||||
private _options: MediaActionsControllerOptions | null = null;
|
private _options: MediaActionsControllerOptions | null = null;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
import { LitElement } from 'lit';
|
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