https://bugs.kde.org/show_bug.cgi?id=477061
Bug ID: 477061 Summary: [Feature Request] Provide Typescript definition files Classification: Plasma Product: kwin Version: master Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: scripting Assignee: kwin-bugs-n...@kde.org Reporter: kmcwilliampub...@gmail.com Target Milestone: --- It would be very nice if KWin could provide [Typescript definition files](https://www.typescriptlang.org/docs/handbook/2/type-declarations.html) for the scripting API. This would provide type information to the IDE, making it easier to work with KWin scripts by providing autocompletion and documentation directly in the IDE. This would improve efficiency and reduce barriers to entry for people to use KWin scripting, and likely reduce the instances of help requests for people doing things like trying to create KWin scripts. ## Specific example Someone is trying to create their first KWin script and is unfamiliar with all the various types available, and they will have to look up every single property, function, etc in separate documentation. By contrast having the type information available allows one to see directly in the editor things like autocompletion so that something like `workspace.` gives an immediately relevant list of possibilities and how to call them: > Ah, `workspace.activeClient` sounds like exactly what I need! > > `workspace.activeClient.` now gives me a list of properties and functions I > can use on the active client. Nice! ## Benefits - **Reduced barrier to entry** for people to use KWin scripting - **Improved documentation** for the scripting API, since the type information and doc comments would be available directly in the IDE - **Improved efficiency** for people writing KWin scripts, since they don't have to look up the documentation for every single property, function, etc - **Improved code quality** for KWin scripts, since the IDE can provide warnings and errors for things like typos, incorrect types, etc I think this would be a huge improvement to the KWin scripting experience. I know I have struggled a lot with KWin scripting because of the lack of type information and thorough documentation, and I think this would help a lot of people. -- You are receiving this mail because: You are watching all bug changes.