update types

This commit is contained in:
Robert Soriano
2022-05-17 14:25:03 -07:00
parent bb5dc377d5
commit 9fac4ac4d9
25 changed files with 479 additions and 363 deletions

View File

@@ -1,7 +0,0 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env

View File

@@ -1,42 +0,0 @@
# Nuxt 3 Minimal Starter
Look at the [nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.
## Setup
Make sure to install the dependencies:
```bash
# yarn
yarn install
# npm
npm install
# pnpm
pnpm install --shamefully-hoist
```
## Development Server
Start the development server on http://localhost:3000
```bash
npm run dev
```
## Production
Build the application for production:
```bash
npm run build
```
Locally preview production build:
```bash
npm run preview
```
Checkout the [deployment documentation](https://v3.nuxtjs.org/docs/deployment) for more information.

View File

@@ -1,18 +0,0 @@
<script setup lang="ts">
const { data, error } = useTrpcQuery('hello')
// const d = useLazyAsyncData('asd', () => $fetch('/api/hello'))
watch(data, (val) => {
console.log('val', val)
console.log('error', error.value)
}, {
immediate: true,
})
</script>
<template>
<div>
{{ data }}
</div>
</template>

View File

@@ -1,6 +0,0 @@
import { defineNuxtConfig } from 'nuxt'
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
modules: ['trpc-nuxt'],
})

View File

@@ -1,18 +0,0 @@
{
"name": "playground",
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"prepare": "nuxt prepare"
},
"dependencies": {
"trpc-nuxt": "link:../trpc",
"zod": "^3.16.0"
},
"devDependencies": {
"nuxt": "3.0.0-rc.3"
}
}

View File

@@ -1,11 +0,0 @@
// generated by trpc-nuxt
import * as trpc from '@trpc/server'
export const router = trpc
.router()
.query('hello', {
resolve: () => 'world',
});
export type Router = typeof router

View File

@@ -1,3 +0,0 @@
{
"extends": "./.nuxt/tsconfig.json"
}