diff --git a/package.json b/package.json index 10e024b..0d53a45 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "jest --bail", "test:watch": "jest --watch --bail", "test:coverage": "yarn test --coverage", - "check-packages": "yarn clean && yarn build && yarn test && yarn lint && yarn type-check", + "check-packages": "yarn clean && yarn build && yarn test && yarn lint && yarn check-types", "bump-version": "lerna --ignore=examples/* version --no-push --exact", "deploy": "lerna publish --conventional-commits --message 'chore: release new versions'", "prerelease": "lerna publish --conventional-prerelease --pre-dist-tag next", diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 033da87..74e2494 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -260,7 +260,7 @@ export type ResourceMethods = ResourceFetchMethods | ResourcePostMethods; export type AllowedFetchMethods = 'get' | 'head' | 'options'; -export type AllowedPostMethods = 'post' | 'patch' | 'put' | 'del'; +export type AllowedPostMethods = 'post' | 'patch' | 'put' | 'del' | 'delete'; export type AllowedMethods = AllowedFetchMethods | AllowedPostMethods; diff --git a/packages/tg-resources-fetch/src/resource.ts b/packages/tg-resources-fetch/src/resource.ts index 407b88d..f3b72ef 100644 --- a/packages/tg-resources-fetch/src/resource.ts +++ b/packages/tg-resources-fetch/src/resource.ts @@ -105,7 +105,14 @@ function parseMethod(method: AllowedMethods) { case 'put': return 'PUT'; + case 'patch': + return 'PATCH'; + + case 'post': + return 'POST'; + case 'del': + case 'delete': return 'DELETE'; default: