mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-07-31 05:45:35 +08:00
typescript
This commit is contained in:
@@ -193,7 +193,6 @@ export default defineEventHandler(async (event) => {
|
||||
const tts = await normalize.audio.speech.create({
|
||||
model: TTS_MODEL,
|
||||
voice,
|
||||
format: "wav",
|
||||
input: normalized,
|
||||
speed
|
||||
});
|
||||
|
||||
@@ -214,8 +214,9 @@ function createFeature(element: OsmElement): AirportFeature | null {
|
||||
|
||||
if (lat === undefined || lon === undefined) return null
|
||||
|
||||
const { aliases, primaryAlias } = buildAliases(tags, featureType)
|
||||
if (aliases.length === 0 || !primaryAlias) return null
|
||||
const aliasResult = buildAliases(tags, featureType)
|
||||
if (aliasResult.aliases.length === 0 || !aliasResult.primaryAlias) return null
|
||||
const { aliases, primaryAlias } = aliasResult as { aliases: string[]; primaryAlias: string }
|
||||
|
||||
const normalizedAliases = new Map<string, string>()
|
||||
for (const alias of aliases) {
|
||||
|
||||
@@ -20,9 +20,7 @@ export default defineEventHandler(async () => {
|
||||
try {
|
||||
const response = await client.chat.completions.create({
|
||||
model,
|
||||
reasoning_effort: 'low',
|
||||
n: 1,
|
||||
verbosity: 'low',
|
||||
messages: [
|
||||
{ role: 'system', content: SYSTEM_PROMPT },
|
||||
{ role: 'user', content: `${READBACK}` }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createBaseScenario, createScenarioSeries, digitsToWords, formatTemp, lettersToNato } from '~~/shared/learn/scenario'
|
||||
import type { ModuleDef, Scenario } from '~~/shared/learn/types'
|
||||
import type { Lesson, ModuleDef, Scenario } from '~~/shared/learn/types'
|
||||
|
||||
function gradientArt(colors: string[]): string {
|
||||
const stops = colors
|
||||
@@ -14,7 +14,7 @@ function randInt(min: number, max: number): number {
|
||||
}
|
||||
|
||||
function sample<T>(values: readonly T[]): T {
|
||||
return values[randInt(0, values.length - 1)]
|
||||
return values[randInt(0, values.length - 1)]!
|
||||
}
|
||||
|
||||
const identifierCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
|
||||
@@ -75,7 +75,7 @@ function createComplexTaxiScenario(): Scenario {
|
||||
return scenario
|
||||
}
|
||||
|
||||
const fundamentalsLessons = [
|
||||
const fundamentalsLessons: Lesson[] = [
|
||||
{
|
||||
id: 'icao-alphabet',
|
||||
title: 'Decode ICAO Letters & Numbers',
|
||||
@@ -564,7 +564,7 @@ const fundamentalsLessons = [
|
||||
}
|
||||
]
|
||||
|
||||
const readbackLessons = [
|
||||
const readbackLessons: Lesson[] = [
|
||||
{
|
||||
id: 'clearance-readback',
|
||||
title: 'Clearance Readback',
|
||||
@@ -1810,7 +1810,7 @@ const readbackLessons = [
|
||||
}
|
||||
]
|
||||
|
||||
const decisionTreeLessons = [
|
||||
const decisionTreeLessons: Lesson[] = [
|
||||
{
|
||||
id: 'clearance-contact',
|
||||
title: 'Delivery: Initial contact',
|
||||
@@ -2534,7 +2534,7 @@ const makeFullFlightGenerator = (reset = false) => () => {
|
||||
return fullFlightScenario()
|
||||
}
|
||||
|
||||
const fullFlightLessons = [
|
||||
const fullFlightLessons: Lesson[] = [
|
||||
{
|
||||
id: 'full-clearance-contact',
|
||||
title: 'Delivery Contact',
|
||||
|
||||
21
types/aos.d.ts
vendored
Normal file
21
types/aos.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
declare module 'aos' {
|
||||
interface AOSOptions {
|
||||
offset?: number
|
||||
delay?: number | string
|
||||
duration?: number | string
|
||||
easing?: string
|
||||
once?: boolean
|
||||
mirror?: boolean
|
||||
anchorPlacement?: string
|
||||
disable?: boolean | string | (() => boolean)
|
||||
}
|
||||
|
||||
interface AOS {
|
||||
init(options?: AOSOptions): void
|
||||
refresh(force?: boolean): void
|
||||
refreshHard(): void
|
||||
}
|
||||
|
||||
const aos: AOS
|
||||
export default aos
|
||||
}
|
||||
Reference in New Issue
Block a user