fix: replace any types with unknown to fix linting errors

This commit is contained in:
codegen-sh[bot] committed 2025-08-18 22:19:11 +00:00
1 parent 391fc5fdee
commit 4a8b8d5fa7
4 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ type Props = Omit<EditorProps, "editorStyle"> & {
* The main document editor includes an editable title with metadata below it,
* and support for commenting.
*/
function DocumentEditor(props: Props, ref: React.RefObject<any>) {
function DocumentEditor(props: Props, ref: React.RefObject<unknown>) {
const titleRef = React.useRef<RefHandle>(null);
const { t } = useTranslation();
const match = useRouteMatch();
+2 -2
View File
@@ -6,7 +6,7 @@ import env from "./env";
const SLACK_API_URL = "https://slack.com/api";
export async function post(endpoint: string, body: Record<string, any>) {
export async function post(endpoint: string, body: Record<string, unknown>) {
let data;
const token = body.token;
@@ -30,7 +30,7 @@ export async function post(endpoint: string, body: Record<string, any>) {
return data;
}
export async function request(endpoint: string, body: Record<string, any>) {
export async function request(endpoint: string, body: Record<string, unknown>) {
let data;
try {
+2 -2
View File
@@ -14,7 +14,7 @@ export enum TaskSchedule {
Minute = "minute",
}
export default abstract class BaseTask<T extends Record<string, any>> {
export default abstract class BaseTask<T extends Record<string, unknown>> {
/**
* An optional schedule for this task to be run automatically.
*/
@@ -43,7 +43,7 @@ export default abstract class BaseTask<T extends Record<string, any>> {
* @param props Properties to be used by the task
* @returns A promise that resolves once the task has completed.
*/
public abstract perform(props: T): Promise<any>;
public abstract perform(props: T): Promise<unknown>;
/**
* Handle failure when all attempts are exhausted for the task.
+1 -1
View File
@@ -3,7 +3,7 @@ import BaseTask from "./BaseTask";
type Props = {
templateName: string;
props: Record<string, any>;
props: Record<string, unknown>;
};
export default class EmailTask extends BaseTask<Props> {