+ {comment &&
{comment}
}
+ {linkComment && (
+
+ )}
+ {signature && (
+
+ {
+ signatureMonacoRef.current = _monaco;
+ }}
+ onMount={handleEditorDidMount(
+ signatureMonacoRef,
+ signatureEditorRef,
+ signatureContainerRef,
+ undefined,
+ (_monaco, _editor) => {
+ routeToAPICmdId.current =
+ _editor.addCommand(0, () => {
+ apiUrlToRoute.current && navigate(apiUrlToRoute.current);
+ }) ?? null;
+
+ if (!hoverProviderDispose.current) {
+ hoverProviderDispose.current = _monaco.languages.registerHoverProvider('typescript', {
+ provideHover: hoverProvider,
+ });
+ }
+ },
+ () => {
+ hoverProviderDispose.current?.dispose();
+ }
+ )}
+ />
+
+ )}
+ {example && example.comment && (
+
+
Example
+
+ {
+ exampleMonacoRef.current = _monaco;
+ }}
+ onMount={handleEditorDidMount(exampleMonacoRef, exampleEditorRef, exampleContainerRef)}
+ />
+
+
+ )}
+ {children}
+