Skip to content

Commit f55ba07

Browse files
Fix external links to MDN.
1 parent a1f740f commit f55ba07

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

packages/lit-dev-content/site/_includes/api.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125
{%- elif t.location -%}
126126
{{- locationLink(t.location, t.name) -}}
127127

128-
{%- elif t.externalLocation -%}
129-
{{- externalLink(t.externalLocation.url, t.name) -}}
128+
{%- elif t.externalUrl -%}
129+
{{- externalLink(t.externalUrl, t.name) -}}
130130

131131
{%- elif t.type == "literal" -%}
132132
{%- if t.value == null -%}

packages/lit-dev-tools-cjs/src/api-docs/transformer.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
SourceReference,
1616
ExtendedSourceReference,
1717
Location,
18-
ExternalLocation,
1918
MigrationComment,
2019
} from './types.js';
2120
import {ReflectionKind} from 'typedoc';
@@ -434,9 +433,8 @@ export class ApiDocsTransformer {
434433
typeof val === 'string' &&
435434
symbolToExternalLink.has(val)
436435
) {
437-
(node as {externalLocation?: ExternalLocation}).externalLocation = {
438-
url: symbolToExternalLink.get(val)!,
439-
};
436+
(node as {externalUrl?: string}).externalUrl =
437+
symbolToExternalLink.get(val);
440438
} else if (!(isTopLevel && key === 'children')) {
441439
// We already recurse into children of top-level reflections in our main
442440
// traversal, no need to also do it here.

packages/lit-dev-tools-cjs/src/api-docs/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export interface MigrationComment
2828

2929
export interface ExtendedDeclarationReflection extends DeclarationReflection {
3030
location?: Location;
31-
externalLocation?: ExternalLocation;
3231
entrypointSources?: Array<ExtendedSourceReference>;
3332
heritage?: Array<{name: string; location?: Location}>;
3433
expandedCategories?: Array<{
@@ -58,11 +57,6 @@ export interface Location {
5857
excludeFromTOC?: boolean;
5958
}
6059

61-
/** A link to e.g. MDN. */
62-
export interface ExternalLocation {
63-
url: string;
64-
}
65-
6660
export interface ApiDocsConfig {
6761
/**
6862
* Git repo remote URL.

0 commit comments

Comments
 (0)