Skip to content

Commit f61185d

Browse files
devdoomaridevdoomari3
authored andcommitted
fix tests and update deps (2020-08-06)
1 parent d00d7a4 commit f61185d

File tree

7 files changed

+978
-694
lines changed

7 files changed

+978
-694
lines changed

py_codegen/plugins/typescript/Converter.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ def __call__(self, val: Any) -> str: ...
3535
def default_literal_converter(val: Any) -> str:
3636
if isinstance(val, str):
3737
return f"'{val}'"
38+
39+
if val is True:
40+
return "true"
41+
if val is False:
42+
return "false"
3843
if isinstance(val, int) \
3944
or isinstance(val, float):
4045
return f"{val}"
41-
if val == True:
42-
return "true"
43-
if val == False:
44-
return "false"
4546
if isinstance(val, list):
4647
converted = [default_literal_converter(item) for item in val]
4748
converted_str = ','.join(converted)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export function func_with_literals(
2-
input1: 'a' | 1 | 2 | 3 | True | 3,
2+
input1: 'a' | 1 | 2 | 3 | true | 3,
33
input2: 1 | null,
4-
): True | 5 | 3
4+
): true | 5 | 3

py_codegen/plugins/typescript/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
"main": "index.js",
66
"license": "MIT",
77
"devDependencies": {
8-
"@types/fs-extra": "^8.1.0",
9-
"@types/jest": "^25.2.1",
10-
"@types/lodash": "^4.14.149",
11-
"@types/node": "^13.11.1",
12-
"@types/prettier": "^2.0.0",
13-
"fs-extra": "^9.0.0",
14-
"jest": "^25.3.0",
15-
"prettier": "^2.0.4",
16-
"ts-jest": "^25.3.1",
17-
"tslint": "^6.1.1",
18-
"typescript": "^3.8.3"
8+
"@types/fs-extra": "^9.0.1",
9+
"@types/jest": "^26.0.9",
10+
"@types/lodash": "^4.14.159",
11+
"@types/node": "^14.0.27",
12+
"@types/prettier": "^2.0.2",
13+
"fs-extra": "^9.0.1",
14+
"jest": "^26.2.2",
15+
"prettier": "^2.0.5",
16+
"ts-jest": "^26.1.4",
17+
"tslint": "^6.1.3",
18+
"typescript": "^3.9.7"
1919
},
2020
"scripts": {
2121
"test": "jest",
2222
"clean": "rm __tests__/ts_generated/*.d.ts"
2323
},
2424
"dependencies": {
25-
"@types/mz": "^2.7.0",
26-
"lodash": "^4.17.15",
25+
"@types/mz": "^2.7.1",
26+
"lodash": "^4.17.19",
2727
"mz": "^2.7.0"
2828
}
2929
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy