Skip to content

Commit ffa6906

Browse files
authored
Merge pull request #182 from zhengbli/refactor
Remove stale JS-related code + Refactor + Improve comment.json support for added types
2 parents 0ac178b + fdc6018 commit ffa6906

File tree

8 files changed

+1467
-2929
lines changed

8 files changed

+1467
-2929
lines changed

JS.fsx

Lines changed: 0 additions & 720 deletions
This file was deleted.

Shared.fsx

Lines changed: 0 additions & 673 deletions
This file was deleted.

TS.fsx

Lines changed: 1410 additions & 747 deletions
Large diffs are not rendered by default.

baselines/dom.generated.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12732,16 +12732,37 @@ interface Canvas2DContextAttributes {
1273212732
}
1273312733

1273412734
interface URLSearchParams {
12735+
/**
12736+
* Appends a specified key/value pair as a new search parameter.
12737+
*/
1273512738
append(name: string, value: string): void;
12739+
/**
12740+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
12741+
*/
1273612742
delete(name: string): void;
12743+
/**
12744+
* Returns the first value associated to the given search parameter.
12745+
*/
1273712746
get(name: string): string | null;
12747+
/**
12748+
* Returns all the values association with a given search parameter.
12749+
*/
1273812750
getAll(name: string): string[];
12751+
/**
12752+
* Returns a Boolean indicating if such a search parameter exists.
12753+
*/
1273912754
has(name: string): boolean;
12755+
/**
12756+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
12757+
*/
1274012758
set(name: string, value: string): void;
1274112759
}
1274212760

1274312761
declare var URLSearchParams: {
1274412762
prototype: URLSearchParams;
12763+
/**
12764+
* Constructor returning a URLSearchParams object.
12765+
*/
1274512766
new (init?: string | URLSearchParams): URLSearchParams;
1274612767
}
1274712768

build.fsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
#r "packages/FAKE/tools/FakeLib.dll"
2-
#load "Shared.fsx"
32
#load "TS.fsx"
43

54
open Fake
6-
open TS
5+
open TS.Emit
76
open System
87
open System.IO
98

109
Target "Run" (fun _ ->
11-
// For typescript only generate for Dom
12-
TS.EmitDomWeb()
13-
TS.EmitDomWorker()
10+
TS.Emit.EmitDomWeb()
11+
TS.Emit.EmitDomWorker()
1412
)
1513

1614
let testFile file =

inputfiles/comments.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3043,6 +3043,39 @@
30433043
],
30443044
"method": []
30453045
}
3046+
},
3047+
{
3048+
"name": "URLSearchParams",
3049+
"members": {
3050+
"method": [
3051+
{
3052+
"name": "append",
3053+
"comment": "/**\r\n * Appends a specified key/value pair as a new search parameter.\r\n */"
3054+
},
3055+
{
3056+
"name": "delete",
3057+
"comment": "/**\r\n * Deletes the given search parameter, and its associated value, from the list of all search parameters.\r\n */"
3058+
},
3059+
{
3060+
"name": "get",
3061+
"comment": "/**\r\n * Returns the first value associated to the given search parameter.\r\n */"
3062+
},
3063+
{
3064+
"name": "getAll",
3065+
"comment": "/**\r\n * Returns all the values association with a given search parameter.\r\n */"
3066+
},
3067+
{
3068+
"name": "has",
3069+
"comment": "/**\r\n * Returns a Boolean indicating if such a search parameter exists.\r\n */"
3070+
},
3071+
{
3072+
"name": "set",
3073+
"comment": "/**\r\n * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.\r\n */"
3074+
}
3075+
],
3076+
"property": [],
3077+
"constructor": "/**\r\n * Constructor returning a URLSearchParams object.\r\n */"
3078+
}
30463079
}
30473080
]
30483081
}

0 commit comments

Comments
 (0)