From e92a1dc2a6eaa4a8834bef21b5a85a151c6c8478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=23=E4=BA=91=E6=B7=A1=E7=84=B6?= Date: Fri, 17 Mar 2023 01:47:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A6=E5=8F=91=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 5ecd7aa..3f25900 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,17 @@ export async function findPetsByStatus( // ... ``` +Then you can directly import a function and use it. Calling an interface is as simple as calling a local function, is it similar to RPC (remote procedure call). + +```ts +import { findPetsByStatus } from '@/apis/pet'; + +// There are type hints when calling functions and writing parameters, thanks to TypeScript. +const pets = await findPetsByStatus({ + status: ['avaliable'], +}); +``` + ## API ```ts