259 query: ({ productId, lastId }) =>
260 `products/messages/${productId}/${lastId || 0}`,
261 }),
262 updateUser: builder.mutation<void, any>({263 query: (data: any) => ({
264 url: `users/update`,
265 method: 'PATCH',
253 providesTags: ['Comments'],
254 }),
255 getChatMessages: builder.query<
256 void,257 { productId: number; lastId?: number }
258 >({
259 query: ({ productId, lastId }) =>
235 },
236 }),
237 deletePost: builder.mutation<
238 void,239 { productId: number; postId: number; field: string }
240 >({
241 query: ({ productId, postId, field }) => ({
218 },
219 }),
220 removeFromPostsBoard: builder.mutation<
221 void,222 {
223 productId: number
224 postId: number
201 providesTags: ['Board'],
202 }),
203 addToPostsBoard: builder.mutation<
204 void,205 {
206 productId: number
207 postId: number
Disallows usage of void type outside of return types or generic type arguments. If void is used as return type, it shouldn’t be a part of intersection/union type with most other types.
type PossibleValues = string | number | void;
type MorePossibleValues = string | ((number & any) | (string | void));
function logSomething(thing: void) {}
function printArg<T = void>(arg: T) {}
logAndReturn<void>(undefined);
interface Interface {
lambda: () => void;
prop: void;
}
class MyClass {
private readonly propName: void;
}
type NoOp = () => void;
function noop(): void {}
let trulyUndefined = void 0;
async function promiseMeSomething(): Promise<void> {}
type stillVoid = void | never;