Skip to content

Instantly share code, notes, and snippets.

View tlmurphy's full-sized avatar

Trevor Murphy tlmurphy

View GitHub Profile
@tlmurphy
tlmurphy / fix_class_decorators.py
Last active June 2, 2021 22:04
Fix missing parameter for JsonObject when using json2typescript 1.4.0+
from io import TextIOWrapper
import sys
import re
import glob
Q = "'"
REGEX = f'@JsonObject\({Q}{Q}\)|@JsonObject\(\)|^@JsonObject$'
def no_class_descriptor(line):