Skip to content

Commit

Permalink
fix: Fix schema.Delete import
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Jul 13, 2020
1 parent 2dccff4 commit 6106447
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/rest-hooks/src/resource/SimpleResource.ts
Expand Up @@ -5,11 +5,11 @@ import type {
ReadShape,
MutateShape,
} from '@rest-hooks/core';
import { schema } from '@rest-hooks/core';

import { SchemaDetail, SchemaList } from './types';
import { NotImplementedError } from './errors';
import paramsToString from './paramsToString';
import { schemas } from '..';

/** Represents an entity to be retrieved from a server.
* Typically 1:1 with a url endpoint.
Expand Down Expand Up @@ -233,12 +233,12 @@ export default abstract class SimpleResource extends FlatEntity {
/** Shape to delete an entity (delete) */
static deleteShape<T extends typeof SimpleResource>(
this: T,
): MutateShape<schemas.Delete<T>, Readonly<object>, undefined> {
): MutateShape<schema.Delete<T>, Readonly<object>, undefined> {
const options = this.getFetchOptions();
const init = this.getFetchInit({ method: 'DELETE' });
return {
type: 'mutate',
schema: new schemas.Delete(this),
schema: new schema.Delete(this),
options,
getFetchKey: (params: object) => {
return 'DELETE ' + this.url(params);
Expand Down

0 comments on commit 6106447

Please sign in to comment.