Closed Milly closed 3 months ago
The updates involve modifications to type annotations across several functions and classes related to autocmd events. The changes enhance type safety and immutability by transitioning parameters from mutable types to their readonly
counterparts. Additionally, a new type, AutocmdPattern
, has been introduced to provide structured definitions for patterns associated with autocmd events.
Files | Change Summary |
---|---|
autocmd/_utils.ts , autocmd/common.ts , autocmd/group.ts |
Updated type annotations for parameters in various functions to use readonly versions of AutocmdEvent and AutocmdPattern , improving type safety. |
autocmd/types.ts |
Introduced a new type AutocmdPattern , defining specific string literals and special buffer identifiers. |
sequenceDiagram
participant User
participant Denops
participant Autocmd
User->>Denops: Call define(event, pat, cmd)
Denops->>Autocmd: Process event and pattern
Autocmd-->>Denops: Return success
Denops-->>User: Acknowledge define success
🐰 "In the code where patterns align,
Readonly types make our work divine.
Events now safe, no need to fret,
A rabbit's joy, you can bet!
With every change, we hop and play,
Celebrating code in a joyful way!" 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.27%. Comparing base (
49de961
) to head (0cce3fc
). Report is 5 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by CodeRabbit
New Features
AutocmdPattern
to enhance the definition of patterns related to autocmd events.Improvements
readonly
versions ofAutocmdEvent
andAutocmdPattern
, improving type safety and immutability across the application.Bug Fixes