Skip to content

Commit 4c32dbd

Browse files
committed
Removed kind typedinterface and changed parameters to typeparameters.
1 parent 47dafdb commit 4c32dbd

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

TS.fsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ module InputJson =
160160
| SignatureOverload
161161
| TypeDef
162162
| Extends
163-
| TypedInterface
164163
override x.ToString() =
165164
match x with
166165
| Property _ -> "property"
@@ -173,7 +172,6 @@ module InputJson =
173172
| SignatureOverload _ -> "signatureoverload"
174173
| TypeDef _ -> "typedef"
175174
| Extends _ -> "extends"
176-
| TypedInterface _ -> "typedinterface"
177175

178176
let getItemByName (allItems: InputJsonType.Root []) (itemName: string) (kind: ItemKind) otherFilter =
179177
let filter (item: InputJsonType.Root) =
@@ -782,8 +780,8 @@ module Emit =
782780
m.Params.Length = 1 &&
783781
(DomTypeToTsType m.Params.[0].Type) = expectedParamType
784782
let processInterfaceType iName =
785-
match getOverriddenItems ItemKind.TypedInterface Flavor.All |> Array.tryFind (matchInterface iName) with
786-
| Some it -> iName + "<" + (it.Parameters |> String.concat ", ") + ">"
783+
match getOverriddenItems ItemKind.Interface Flavor.All |> Array.tryFind (matchInterface iName) with
784+
| Some it -> iName + "<" + (it.TypeParameters |> String.concat ", ") + ">"
787785
| _ -> iName
788786

789787
/// Emit overloads for the createElement method

inputfiles/overridingTypes.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"kind": "typedinterface",
3+
"kind": "interface",
44
"interface": "CustomEventInit",
5-
"parameters": [
5+
"typeParameters": [
66
"T = any"
77
]
88
},
@@ -13,9 +13,9 @@
1313
"type": "T"
1414
},
1515
{
16-
"kind": "typedinterface",
16+
"kind": "interface",
1717
"interface": "CustomEvent",
18-
"parameters": [
18+
"typeParameters": [
1919
"T = any"
2020
]
2121
},

inputfiles/sample.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@
338338
"interface": "Document"
339339
},
340340
{
341-
"kind": "typedinterface",
341+
"kind": "interface",
342342
"interface": "CustomEventInit",
343-
"parameters": [
343+
"typeParameters": [
344344
"T = any"
345345
]
346346
},

0 commit comments

Comments
 (0)