Sounds like an editor issue. Have you tried it with something like IDEA/WebStorm where there's a bit more code intelligence?