Skip to content

Commit

Permalink
chore: remove dependency on ie11 types (#5941)
Browse files Browse the repository at this point in the history
* feat: new execution context design (#5800)

* refactor: new design for execution context

* feat: add two new event helpers to the execution context and tests

* fix: wip update types to match new context apis

* fix: update foundation and components template types

* Change files

* fix: update template type in fast-website

* fix: update site components for new template types

* fix: add missing api updates

Co-authored-by: EisenbergEffect <[email protected]>

* remove unnecessary dependency on @types/ie11 package

* Change files

Co-authored-by: Rob Eisenberg <[email protected]>
Co-authored-by: EisenbergEffect <[email protected]>
  • Loading branch information
3 people authored May 18, 2022
1 parent 49c720c commit 6b2d216
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "remove unnecessary dependency on @types/ie11 package",
"packageName": "@microsoft/fast-element",
"email": "[email protected]",
"dependentChangeType": "none"
}
1 change: 0 additions & 1 deletion packages/web-components/fast-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"@types/karma": "^5.0.0",
"@types/mocha": "^7.0.2",
"@types/webpack-env": "^1.15.2",
"@types/web-ie11": "^0.0.0",
"chai": "^4.2.0",
"chai-spies": "^1.0.0",
"esm": "^3.2.25",
Expand Down
10 changes: 10 additions & 0 deletions packages/web-components/fast-element/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ export type Mutable<T> = {
-readonly [P in keyof T]: T[P];
};

/**
* Extracts the item type from an array.
* @public
*/
export type ArrayItem<T> = T extends ReadonlyArray<infer TItem>
? TItem
: T extends Array<infer TItem>
? TItem
: any;

/**
* A policy for use with the standard trustedTypes platform API.
* @public
Expand Down
3 changes: 1 addition & 2 deletions packages/web-components/fast-element/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"module": "ESNext",
"types": [
"mocha",
"webpack-env",
"web-ie11"
"webpack-env"
],
"lib": [
"DOM",
Expand Down

0 comments on commit 6b2d216

Please sign in to comment.