GNU bug report logs -
#59660
29.0.50; typescript-ts-mode consistently fontifies method-names incorrectly
Previous Next
Reported by: jostein <at> kjonigsen.net
Date: Mon, 28 Nov 2022 15:05:03 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #47 received at 59660 <at> debbugs.gnu.org (full text, mbox):
On 29 November 2022 17:35:31 CET, "Jostein Kjønigsen" <jostein <at> secure.kjonigsen.net> wrote:
>
>
>> On 29 Nov 2022, at 16:10, Theodor Thornhill <theo <at> thornhill.no> wrote:
>>
>> Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> writes:
>>
>>> Cc: 59660 <at> debbugs.gnu.org, theo <at> thornhill.no
>>>>> From: Yuan Fu <casouri <at> gmail.com>
>>>>> Date: Mon, 28 Nov 2022 15:06:30 -0800
>>>>>
>>>>> Maybe you can remove the :override flag for the property_identifier rule, so it doesn’t shadow the function rule? Would that work better?
>>> I plan to test that as quickly as I time permits. If we can make both
>>> behaviours work, that would obviously be the best.
>>>> This could be a personal preference, perhaps? It isn't clear to me that
>>>> only one of the two is definitely correct. So maybe we need a user option
>>>> for which one overrides which?
>>>
>>> I honestly think this is reasonably clear.
>>>
>>> "Properties" with getters and setters are at this point in time almost
>>> entirely unused in EcmaScript/TypeScript space. They are optional and
>>> have complicated syntax, and don't play well with JSON serialization
>>> (and thus can't be used in REST APIs).
>>>
>>> You however cannot write a program without defining or invoking
>>> methods/functions. So not having method-fontification working correctly
>>> will literally impact **all** TypeScript-users.
>>
>> Could you give me a code example, Jostein? I'm just interested in a
>> repro, because I can't reproduce it with the typescript-ts-mode.
>>
>> I tried using this from [0]:
>> ```
>> class Greeter {
>> greeting: string;
>>
>> constructor(message: string) {
>> this.greeting = message;
>> }
>>
>> greet() {
>> return "Hello, " + this.greeting;
>> }
>> }
>> ```
>>
>> On my end I get no property-face, just function-name-face. Both on
>> constructor and greet. I'm not saying I disagree with you, but what am
>> I missing?
>>
>> Theo
>>
>> [0]: https://www.typescriptlang.org/docs/handbook/classes.html
>>
>
>I’ve already submitted patches to fix this which Yuan has pushed. Try going a couple days back in time and try again ;)
>
>What remains to be decided is what we do with property-highlighting, and if we can find a way to enable that without colliding with function-names.
>
>—
>Jostein Kjønigsen
>https://jostein.kjønigsen.net
Ah, don't mind me, I'll hide in the corner :-)
This bug report was last modified 2 years and 197 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.