mirror of
https://github.com/type-challenges/type-challenges.git
synced 2025-12-08 19:06:13 +00:00
39 lines
1001 B
TypeScript
39 lines
1001 B
TypeScript
import type { DeepPartial } from 'utility-types'
|
|
import type { context, getOctokit } 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' | '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>
|
|
}
|
|
}
|