33 "prefix" : " /loader" ,
44 "scope" : " typescriptreact,javascriptreact,typescript,javascript" ,
55 "body" : [
6- " import { type LoaderFunctionArgs, json } from \" @remix-run/node \" " ,
6+ " import { type Route } from \" ./+types/${TM_FILENAME_BASE}.ts \" " ,
77 " " ,
8- " export async function loader({ request }: LoaderFunctionArgs ) {" ,
9- " return json({}) " ,
8+ " export async function loader({ request }: Route.LoaderArgs ) {" ,
9+ " return {} " ,
1010 " }" ,
1111 ],
1212 },
1313 "action" : {
1414 "prefix" : " /action" ,
1515 "scope" : " typescriptreact,javascriptreact,typescript,javascript" ,
1616 "body" : [
17- " import { type ActionFunctionArgs, json } from \" @remix-run/node \" " ,
17+ " import { type Route } from \" ./+types/${TM_FILENAME_BASE}.ts \" " ,
1818 " " ,
19- " export async function action({ request }: ActionFunctionArgs ) {" ,
20- " return json({}) " ,
19+ " export async function action({ request }: Route.ActionArgs ) {" ,
20+ " return {} " ,
2121 " }" ,
2222 ],
2323 },
3838 "prefix" : " /headers" ,
3939 "scope" : " typescriptreact,javascriptreact,typescript,javascript" ,
4040 "body" : [
41- " import type { HeadersFunction } from '@remix-run/node'" ,
42- " " ,
43- " export const headers: HeadersFunction = ({ loaderHeaders }) => ({" ,
44- " 'Cache-Control': loaderHeaders.get('Cache-Control') ?? ''," ,
41+ " import { type Route } from \" ./+types/${TM_FILENAME_BASE}.ts\" " ,
42+ " export const headers: Route.HeadersFunction = ({ loaderHeaders }) => ({" ,
43+ " 'Cache-Control': loaderHeaders.get('Cache-Control') ?? ''," ,
4544 " })" ,
4645 ],
4746 },
4847 "links" : {
4948 "prefix" : " /links" ,
5049 "scope" : " typescriptreact,javascriptreact,typescript,javascript" ,
5150 "body" : [
52- " import type { LinksFunction } from '@remix-run/node' " ,
51+ " import { type Route } from \" ./+types/${TM_FILENAME_BASE}.ts \" " ,
5352 " " ,
54- " export const links: LinksFunction = () => {" ,
53+ " export const links: Route. LinksFunction = () => {" ,
5554 " return []" ,
5655 " }" ,
5756 ],
6059 "prefix" : " /meta" ,
6160 "scope" : " typescriptreact,javascriptreact,typescript,javascript" ,
6261 "body" : [
63- " import type { MetaFunction } from '@remix-run/node' " ,
62+ " import { type Route } from \" ./+types/${TM_FILENAME_BASE}.ts \" " ,
6463 " " ,
65- " export const meta: MetaFunction<typeof loader> = ({ data }) => [{" ,
64+ " export const meta: Route. MetaFunction = ({ data }) => [{" ,
6665 " title: 'Title'," ,
6766 " }]" ,
6867 ],
7170 "prefix" : " /shouldRevalidate" ,
7271 "scope" : " typescriptreact,javascriptreact,typescript,javascript" ,
7372 "body" : [
74- " import type { ShouldRevalidateFunction } from '@remix-run/ react'" ,
73+ " import { type ShouldRevalidateFunctionArgs } from 'react-router '" ,
7574 " " ,
76- " export const shouldRevalidate: ShouldRevalidateFunction = ({" ,
77- " defaultShouldRevalidate" ,
78- " }) => {" ,
75+ " export function shouldRevalidate({ defaultShouldRevalidate }: ShouldRevalidateFunctionArgs) {" ,
7976 " return defaultShouldRevalidate" ,
8077 " }" ,
8178 ],
8279 },
83- }
80+ }
0 commit comments