Strongly type everything

This commit is contained in:
Taevas 2023-05-10 19:55:11 +02:00
parent 842a627cac
commit fee3766c2b
18 changed files with 221 additions and 109 deletions

View file

@ -1,5 +1,6 @@
import { Handler } from '@netlify/functions'
import { Octokit } from '@octokit/core'
import { GithubInfo } from '../../src/components/Github'
const handler: Handler = async (event, context) => {
let octokit = new Octokit({auth: process.env.API_GITHUB})
@ -20,7 +21,7 @@ const handler: Handler = async (event, context) => {
}
}
let info = {
let info: GithubInfo = {
public: {
repo: public_push.repo.name,
date: public_push.created_at.substring(0, public_push.created_at.indexOf("T"))