Skip to content

Commit

Permalink
Fixed lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Aug 17, 2024
1 parent 43b51b9 commit d36e92b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS"><code>LOCALE_NUMERALS</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#LOCATION"><code>LOCATION</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#MOZILLA"><code>MOZILLA</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NAME"><code>NAME</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NO_FF_SRC"><code>NO_FF_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#V8_SRC"><code>V8_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#NO_IE_SRC"><code>NO_IE_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#V8_SRC"><code>V8_SRC</code></a>)
Expand Down Expand Up @@ -84,6 +85,7 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS"><code>LOCALE_NUMERALS</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a> and <a href="api-doc/interfaces/FeatureAll.md#SHORT_LOCALES"><code>SHORT_LOCALES</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#LOCATION"><code>LOCATION</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#MOZILLA"><code>MOZILLA</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NAME"><code>NAME</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NO_IE_SRC"><code>NO_IE_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#FF_SRC"><code>FF_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#NO_OLD_SAFARI_ARRAY_ITERATOR"><code>NO_OLD_SAFARI_ARRAY_ITERATOR</code></a>
Expand Down Expand Up @@ -123,6 +125,7 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_INFINITY"><code>LOCALE_INFINITY</code></a> (Internet Explorer 11 on Windows 10)
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS"><code>LOCALE_NUMERALS</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a> and <a href="api-doc/interfaces/FeatureAll.md#SHORT_LOCALES"><code>SHORT_LOCALES</code></a>; Internet Explorer 11)
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a> (Internet Explorer 11 on Windows 10)
<li><a href="api-doc/interfaces/FeatureAll.md#MOZILLA"><code>MOZILLA</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NO_FF_SRC"><code>NO_FF_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#IE_SRC"><code>IE_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#NO_V8_SRC"><code>NO_V8_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#IE_SRC"><code>IE_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_L_LOCATION_CTOR"><code>OBJECT_L_LOCATION_CTOR</code></a>
Expand Down Expand Up @@ -171,6 +174,7 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS"><code>LOCALE_NUMERALS</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a> and <a href="api-doc/interfaces/FeatureAll.md#SHORT_LOCALES"><code>SHORT_LOCALES</code></a>; Safari 10.0+)
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a> (Safari 10.0+)
<li><a href="api-doc/interfaces/FeatureAll.md#LOCATION"><code>LOCATION</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#MOZILLA"><code>MOZILLA</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NAME"><code>NAME</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NODECONSTRUCTOR"><code>NODECONSTRUCTOR</code></a> (not in Safari 10.0+)
<li><a href="api-doc/interfaces/FeatureAll.md#NO_IE_SRC"><code>NO_IE_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#FF_SRC"><code>FF_SRC</code></a>)
Expand Down Expand Up @@ -215,6 +219,7 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS"><code>LOCALE_NUMERALS</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a> and <a href="api-doc/interfaces/FeatureAll.md#SHORT_LOCALES"><code>SHORT_LOCALES</code></a>; Android Browser 4.4)
<li><a href="api-doc/interfaces/FeatureAll.md#LOCALE_NUMERALS_EXT"><code>LOCALE_NUMERALS_EXT</code></a> (Android Browser 4.4)
<li><a href="api-doc/interfaces/FeatureAll.md#LOCATION"><code>LOCATION</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#MOZILLA"><code>MOZILLA</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NAME"><code>NAME</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#NO_FF_SRC"><code>NO_FF_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#V8_SRC"><code>V8_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#NO_IE_SRC"><code>NO_IE_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#HTMLAUDIOELEMENT"><code>HTMLAUDIOELEMENT</code></a> and <a href="api-doc/interfaces/FeatureAll.md#V8_SRC"><code>V8_SRC</code></a>)
Expand Down
12 changes: 12 additions & 0 deletions api-doc/interfaces/FeatureAll.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,18 @@ Available in Chrome, Edge, Firefox, Safari, Opera, and Android Browser.

***

### MOZILLA

> **MOZILLA**: [`ElementaryFeature`](ElementaryFeature.md)
Existence of user agent string navigator.userAgent that starts with "Mozilla".

#### Remarks

Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser.

***

### NAME

> **NAME**: [`ElementaryFeature`](ElementaryFeature.md)
Expand Down
16 changes: 16 additions & 0 deletions api-doc/interfaces/FeatureConstructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,22 @@ Available in Chrome, Edge, Firefox, Safari, Opera, and Android Browser.

***

### MOZILLA

> **MOZILLA**: [`ElementaryFeature`](ElementaryFeature.md)
Existence of user agent string navigator.userAgent that starts with "Mozilla".

#### Remarks

Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser.

#### Inherited from

[`FeatureAll`](FeatureAll.md).[`MOZILLA`](FeatureAll.md#mozilla)

***

### NAME

> **NAME**: [`ElementaryFeature`](ElementaryFeature.md)
Expand Down
2 changes: 1 addition & 1 deletion api-doc/type-aliases/ElementaryFeatureName.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

# Type Alias: ElementaryFeatureName

> **ElementaryFeatureName**: `"ANY_DOCUMENT"` \| `"ANY_WINDOW"` \| `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"ASYNC_FUNCTION"` \| `"AT"` \| `"ATOB"` \| `"BARPROP"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"DOMWINDOW"` \| `"ESC_HTML_ALL"` \| `"ESC_HTML_QUOT"` \| `"ESC_HTML_QUOT_ONLY"` \| `"ESC_REGEXP_LF"` \| `"ESC_REGEXP_SLASH"` \| `"FF_SRC"` \| `"FILL"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"GENERIC_ARRAY_TO_STRING"` \| `"GLOBAL_UNDEFINED"` \| `"GMT"` \| `"HISTORY"` \| `"HTMLAUDIOELEMENT"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"INTL"` \| `"ITERATOR_HELPER"` \| `"JAPANESE_INFINITY"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS"` \| `"LOCALE_NUMERALS_EXT"` \| `"LOCATION"` \| `"NAME"` \| `"NODECONSTRUCTOR"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_OLD_SAFARI_ARRAY_ITERATOR"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_L_LOCATION_CTOR"` \| `"OBJECT_UNDEFINED"` \| `"OBJECT_W_SELF"` \| `"OLD_SAFARI_LOCATION_CTOR"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"SELF_OBJ"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"UNDEFINED"` \| `"V8_SRC"` \| `"WINDOW"`
> **ElementaryFeatureName**: `"ANY_DOCUMENT"` \| `"ANY_WINDOW"` \| `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"ASYNC_FUNCTION"` \| `"AT"` \| `"ATOB"` \| `"BARPROP"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"DOMWINDOW"` \| `"ESC_HTML_ALL"` \| `"ESC_HTML_QUOT"` \| `"ESC_HTML_QUOT_ONLY"` \| `"ESC_REGEXP_LF"` \| `"ESC_REGEXP_SLASH"` \| `"FF_SRC"` \| `"FILL"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"GENERIC_ARRAY_TO_STRING"` \| `"GLOBAL_UNDEFINED"` \| `"GMT"` \| `"HISTORY"` \| `"HTMLAUDIOELEMENT"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"INTL"` \| `"ITERATOR_HELPER"` \| `"JAPANESE_INFINITY"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS"` \| `"LOCALE_NUMERALS_EXT"` \| `"LOCATION"` \| `"MOZILLA"` \| `"NAME"` \| `"NODECONSTRUCTOR"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_OLD_SAFARI_ARRAY_ITERATOR"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_L_LOCATION_CTOR"` \| `"OBJECT_UNDEFINED"` \| `"OBJECT_W_SELF"` \| `"OLD_SAFARI_LOCATION_CTOR"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"SELF_OBJ"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"UNDEFINED"` \| `"V8_SRC"` \| `"WINDOW"`

Name of an elementary feature.
6 changes: 0 additions & 6 deletions packages/~feature-hub/src/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,9 @@ FeatureConstructor
{
const info = featureInfos[name];
const getInfoStringField =

/* eslint-disable @typescript-eslint/no-unnecessary-type-parameters */

<FieldNameType extends string>(fieldName: FieldNameType): string | undefined =>
fieldName in info ?
esToString((info as { [Name in FieldNameType]: unknown; })[fieldName]) : undefined;

/* eslint-enable @typescript-eslint/no-unnecessary-type-parameters */

let description = getInfoStringField('description');
let featureObj: PredefinedFeature;
if ('aliasFor' in info)
Expand Down

0 comments on commit d36e92b

Please sign in to comment.