File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2+ import type { IBlog } from '$lib/models/interfaces/iblog.interface' ;
23import { slugFromPath } from '$utils/slug-from-path' ;
34
45/** @type {import('@sveltejs/kit').RequestHandler } */
5- export async function get ( { query } ) {
6+ export async function get ( { query } : { query : URLSearchParams } ) : Promise < Partial < { body : IBlog [ ] ; status : number } > > {
67 const modules = import . meta. glob ( './**/index.{md,svx,svelte.md}' ) ;
78
89 const postPromises = [ ] ;
@@ -39,5 +40,6 @@ export async function get({ query }) {
3940
4041 return {
4142 body : publishedPosts . slice ( 0 , sliceParam ) ,
43+ status : 200 ,
4244 } ;
4345}
Original file line number Diff line number Diff line change 11/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2+ import type { ISnippet } from '$lib/models/interfaces/isnippet.interface' ;
23import { slugFromPath } from '$utils/slug-from-path' ;
34
45/** @type {import('@sveltejs/kit').RequestHandler } */
5- export async function get ( { query } ) {
6+ export async function get ( {
7+ query,
8+ } : {
9+ query : URLSearchParams ;
10+ } ) : Promise < Partial < { body : ISnippet [ ] ; status : number } > > {
611 const modules = import . meta. glob ( './**/index.{md,svx,svelte.md}' ) ;
712
813 const snipptePromises = [ ] ;
Original file line number Diff line number Diff line change 22 /**
33 * @type {import('@sveltejs/kit').Load}
44 */
5- export async function load({ fetch }) {
5+ export async function load({ fetch }: LoadInput ) {
66 return {
77 props: {
88 blogs: await fetch (' /blog.json' ).then ((res ) => res .json ()),
1313
1414<script lang =" ts" >
1515 // Start: Local Imports
16+ import type { LoadInput } from ' @sveltejs/kit' ;
1617 // Components
1718 import HeadTags from ' $components/head-tags/HeadTags.svelte' ;
1819
1920 // Models
2021 import type { IBlog } from ' $models/interfaces/iblog.interface' ;
21- import type { IMetaTagProperties } from ' $models/interfaces/imeta-tag-properties.interface' ;
2222
2323 import { convertToSlug } from ' $utils/convert-to-slug' ;
2424 // End: Local Imports
You can’t perform that action at this time.
0 commit comments