denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.15k stars 619 forks source link

What do the <reference /> mean in main.ts? #2425

Closed ashah888 closed 3 months ago

ashah888 commented 3 months ago

Hi. First time Deno/Fresh user here.

At top of main.ts, there are 5 comments that look like this:

/// <reference no-default-lib="true" />
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
/// <reference lib="deno.ns" />

What do these mean? Is this an example of something?

Is an actual component?

What do each of these lib=".." mean (or do)?

marvinhagemeister commented 3 months ago

It's a TypeScript feature, see https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html