forked from type-challenges/type-challenges
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
38 lines (34 loc) · 999 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { DeepPartial } from 'utility-types'
import type { getOctokit, context } from '@actions/github'
import type Core from '@actions/core'
import type IO from '@actions/io'
export type Github = ReturnType<typeof getOctokit>
export type Context = typeof context
export type Action = (github: Github, context: Context, core: typeof Core, io: typeof IO) => Promise<void>
export interface QuizMetaInfo {
title: string
author: {
name: string
email: string
github: string
}
tsconfig?: Record<string, any>
original_issues: number[]
recommended_solutions: number[]
tags: string[]
related?: string[]
}
export type Difficulty = 'warm-up' | 'easy' | 'medium' | 'hard' | 'extreme' | 'pending'
export interface Quiz {
no: number
difficulty: Difficulty
path: string
readme: Record<string, string>
template: string
info: Record<string, DeepPartial<QuizMetaInfo> | undefined>
tests?: string
solutions?: {
code?: string
readme?: Record<string, string>
}
}