File tree Expand file tree Collapse file tree 5 files changed +70
-0
lines changed Expand file tree Collapse file tree 5 files changed +70
-0
lines changed Original file line number Diff line number Diff line change
1
+ *
2
+ ! ** /* .d.ts
3
+ ! ** /* .d.cts
4
+ ! ** /* .d.mts
5
+ ! ** /* .d. * .ts
Original file line number Diff line number Diff line change
1
+ interface InstallFunction {
2
+ ( ) : Promise < string > ;
3
+ ( installUrl : string ) : Promise < string > ;
4
+ ( installUrl : string , manifestId : string ) : Promise < string > ;
5
+ }
6
+
7
+ interface Navigator {
8
+ install ?: InstallFunction ;
9
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "private" : true ,
3
+ "name" : " @types/web-install-api" ,
4
+ "nonNpm" : true ,
5
+ "nonNpmDescription" : " Web Install API" ,
6
+ "version" : " 2025.1.9999" ,
7
+ "projects" : [
8
+ " https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/WebInstall/explainer.md"
9
+ ],
10
+ "devDependencies" : {
11
+ "@types/web-install-api" : " workspace:."
12
+ },
13
+ "owners" : [
14
+ {
15
+ "name" : " Lia Hiscock" ,
16
+ "githubUsername" : " LiaHiscock"
17
+ },
18
+ {
19
+ "name" : " Kristin Lee" ,
20
+ "githubUsername" : " Kbhlee2121"
21
+ }
22
+ ]
23
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "module" : " node16" ,
4
+ "lib" : [
5
+ " es6" ,
6
+ " dom"
7
+ ],
8
+ "noImplicitAny" : true ,
9
+ "noImplicitThis" : true ,
10
+ "strictFunctionTypes" : true ,
11
+ "strictNullChecks" : true ,
12
+ "types" : [],
13
+ "noEmit" : true ,
14
+ "forceConsistentCasingInFileNames" : true
15
+ },
16
+ "files" : [
17
+ " index.d.ts" ,
18
+ " web-install-api-tests.ts"
19
+ ]
20
+ }
Original file line number Diff line number Diff line change
1
+ if ( navigator . install ) {
2
+ // $ExpectType Promise<string>
3
+ navigator . install ( ) ;
4
+
5
+ // $ExpectType Promise<string>
6
+ navigator . install ( "https://foo.com" ) ;
7
+
8
+ // $ExpectType Promise<string>
9
+ navigator . install ( "https://foo.com" , "manifest-id" ) ;
10
+
11
+ // @ts -expect-error
12
+ navigator . install ( 45 ) ;
13
+ }
You can’t perform that action at this time.
0 commit comments