Open hardfist opened 1 year ago
typescript | babel will emit error when handle wrong syntax like this
https://www.typescriptlang.org/play?#code/DYUwLgBGBcEN4CgLIgQ1gJRAYwPYCcATAHgD4EBfCAXnnXgooG4g
but swc doesn't emit error about this
let t: {a: Record<>} = {a:{}}
empty
https://play.swc.rs/?version=1.3.29&code=H4sIAAAAAAAAA8tJLVEosVKoTrQKSk3OL0qxsatVsAVxq2trrbmS8%2FOK83NS9XLy0zXUS6zUdUo0rQFO5c3GMgAAAA%3D%3D&config=H4sIAAAAAAAAA21UQZLjIAz8C%2Bc5bOU4D5jay7yBIkY4ZDFySSITV8p%2FX2EnOE7GJ9RIQmq1fDNn7sznzYyOGKieeMrirubTyDQCdxRHMR9GWCGhArOeHfUg6gF8%2BHM46G1CZFjvP8wQcwxTTdXhMBIw17PGlAGyqBFcYvVzRPjDj6gjYgKX32zr2MYs0ANtoR2m5EYGe3HUIuprjiJj3kFFwNuRcHxCs48SMWuyB%2BbBeduhb134SNBJvMDmojnUJbMW1ipZQA%2FH0veVvtUTLi4VJy0XXBca9MUWd8LIYkPJ%2FALtKl2htcm7VwyWQArlh88ZY97x8A9A60yOObsBtsgFDzqHvWf4xSvmoEOUqaE64K2qDL02Z2MMrcNaNZDEjS0CXzqoHXZb8ju4a4ijBwshKNstmH%2BidKctWZUihmYqay5sM1hN%2B9DTHq0SeAO%2FtCp5HscdH5ycXjGehiOmtxQDyAn9G6xECL6CpOq9jq9oyR6UZvBPF4Wr2WSqwxe0qS7bg2cVhMbYPuGxyVd3cnC5b7Kcq%2BQESAX%2BF9IImzaEdKUC0lBXksB1sh6C6lM7v836aTL0pSa7LcTroiuJA%2BYzm3lb7zVh5O%2B7813q%2BbLELb8IfdaYef4PrQ4RCGUEAAA%3D
emit error or warning
not emit error or warning
1.3.29
No response
Closing as fixed.
https://play.swc.rs/?version=1.3.107&code=H4sIAAAAAAAAA8tJLVEosVKoTrQKSk3OL0qxsatVsAVxq2trrbmS8%2FOK83NS9XLy0zXUS6zUdUo0rQFO5c3GMgAAAA%3D%3D&config=H4sIAAAAAAAAA31VS47bMAzdzykCr2fbTQ9QzKZnEBSLcpRaokFSMwmC3L2UYucrZ2PYfPx%2Fnk8fm0235777vTnpq35Mlhjo%2Bq0SPiaxB5V0cpyAewqTdJ8LKlwgoQxVcr4AnVgaQIoR8K9ZuxsRGWbtWRRDCv54H67HOBEw38lUqu5yhCRF7O3I8HmPEf7wg98q3yKOYNMbxFg2IQkMQC3HPY6jnRjMt6WGl5KppcDYClHALODMRDg18eSCBEwa8xV1YJ3p0UEDCgS9hG9omWksNUus5TXqqbCDbR6GOuIna%2Fi2Y7bSiAmHOhLNtuF1h4HF%2BJxaLbyAKz24gHNzny2DNwSSKb3a7TGklZn8A9AOjJY52Qgtv1XD6z6tWfu3liF5XVk5NnBd71aVCQZtqgnBNzpbOgMkoTVNApd7KJ3tW%2BnM8Er7ODgw4L3uSsM1%2FwTpd62g5cbRNwCdr%2FWtrboA5nqFK3g5iDfwH61S2gs2a0Qru3WUj3GL45sAEWSH7o2CjkJwHSZlicO0jufkQFcDXFMlcwVeSUAPQNCMlStfdkPPQz2aYcTtjSZmhfOVgqNNw%2B3eH2gYDgKkFPMF4wRP99IJKQV6pHhPvwS2l0fuJfB6%2FaX3p%2FMS%2FGN51khdRJdrCvNfpGxRIX8desS05%2B6muRD%2BkkgX%2BO9iXcs7%2Fwc6MHTglQYAAA%3D%3D
Oops. I misread the issue
Describe the bug
typescript | babel will emit error when handle wrong syntax like this
https://www.typescriptlang.org/play?#code/DYUwLgBGBcEN4CgLIgQ1gJRAYwPYCcATAHgD4EBfCAXnnXgooG4g
but swc doesn't emit error about this
Input code
Config
Playground link
https://play.swc.rs/?version=1.3.29&code=H4sIAAAAAAAAA8tJLVEosVKoTrQKSk3OL0qxsatVsAVxq2trrbmS8%2FOK83NS9XLy0zXUS6zUdUo0rQFO5c3GMgAAAA%3D%3D&config=H4sIAAAAAAAAA21UQZLjIAz8C%2Bc5bOU4D5jay7yBIkY4ZDFySSITV8p%2FX2EnOE7GJ9RIQmq1fDNn7sznzYyOGKieeMrirubTyDQCdxRHMR9GWCGhArOeHfUg6gF8%2BHM46G1CZFjvP8wQcwxTTdXhMBIw17PGlAGyqBFcYvVzRPjDj6gjYgKX32zr2MYs0ANtoR2m5EYGe3HUIuprjiJj3kFFwNuRcHxCs48SMWuyB%2BbBeduhb134SNBJvMDmojnUJbMW1ipZQA%2FH0veVvtUTLi4VJy0XXBca9MUWd8LIYkPJ%2FALtKl2htcm7VwyWQArlh88ZY97x8A9A60yOObsBtsgFDzqHvWf4xSvmoEOUqaE64K2qDL02Z2MMrcNaNZDEjS0CXzqoHXZb8ju4a4ijBwshKNstmH%2BidKctWZUihmYqay5sM1hN%2B9DTHq0SeAO%2FtCp5HscdH5ycXjGehiOmtxQDyAn9G6xECL6CpOq9jq9oyR6UZvBPF4Wr2WSqwxe0qS7bg2cVhMbYPuGxyVd3cnC5b7Kcq%2BQESAX%2BF9IImzaEdKUC0lBXksB1sh6C6lM7v836aTL0pSa7LcTroiuJA%2BYzm3lb7zVh5O%2B7813q%2BbLELb8IfdaYef4PrQ4RCGUEAAA%3D
Expected behavior
emit error or warning
Actual behavior
not emit error or warning
Version
1.3.29
Additional context
No response