[Typescript] Set filename in Typescript playground

////////////////////////////////////////////////////////
// @filename: berries/raspberry.ts
export class Raspberry {
    constructor(public color: 'red' | 'black') {}
}
export function pickRaspberries(time: number): Raspberry[] {
  console.log('picking raspberries')
  return []
}
////////////////////////////////////////////////////////
// @filename: index.ts
import { Raspberry } from './berries/raspberry'

let x: Raspberry = { color: 'red' };
posted @ 2024-01-28 20:14  Zhentiw  阅读(3)  评论(0编辑  收藏  举报