LoadFileHook: (
uri: string,
importPath: string,
fromUri: string,
) => Promise<{ content: string; languageId?: string; uri: string } | null>
Type Declaration
- (
uri: string,
importPath: string,
fromUri: string,
): Promise<{ content: string; languageId?: string; uri: string } | null> Parameters
- uri: string
- importPath: string
- fromUri: string
Returns Promise<{ content: string; languageId?: string; uri: string } | null>
Host hook: the library believes a file exists at
uribut has no model for it. The host fetches it (server, virtual FS, …) and returns its content; the library creates a Monaco model from it so subsequent navigation into that file works natively.