import {myFunc} from '....';
........
const handleChangeRoadCosts = (id: number, keyVal: string, val: string) => {
return myFunc(id, keyVal, val, data);
};
.used-p-c:valid {
....
}
type CompanyInfoSectionProps = {
title: string;
to: string;
items: string[];
[key: `_${string}`]: string | boolean;
};
["useVerificationToken", "getUserByEmail"].filter((method) => !adapter[method])
(["useVerificationToken", "getUserByEmail"] as const).filter((method) => !adapter[method])
type Schemas<P extends keyof paths> = paths[P]['post'] extends {requestBody: infer R} ? R : never;
const addTimeDescription = (str) =>
str.replace(/\b\d{1,2}:\d{2}\b(?!.*?\b\d{1,2}:\d{2}\b)/, '$& (время местное)');
// пример использования
const originalString = " с 14:01 к 15:00 работать по плановому";
const updatedString = addTimeDescription(originalString); // ' с 14:01 к 15:00 (время местное) работать по плановому'
/^.*\b\d\d?:\d\d\b/
export function getDocuments<T>(slug: ''): Promise<T[]>;
export function getDocuments<T>(slug: string): Promise<T>;
export function getDocuments<T>(): Promise<T[]>;
export function getDocuments(slug = ''): Promise<unknown> {
const endpoint = `/documents/${slug}`
return getPosts(endpoint);
}
class DataService {
method(callsStore) {
...
callsStore.setCall(...);
}
}