Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(Color): improve Color lib (types, etc.) #352

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

tmillr
Copy link
Member

@tmillr tmillr commented Jul 17, 2024

  • Fixup types and doc-comment descriptions. The Color module and Color instances are now well-typed providing LSP completion and type-hinting. The Color type has been renamed and namspaced under GhTheme.*. Types provided by the Color module are namespaced under GhTheme.Color.*. The reason for the namespacing is because the Lua LSP considers all defined types to be global.

  • Remove duplicated code in __call and new().

  • Throw an error if the argument given to the Color constructor is of invalid type. Previously there was no error and it just returned nil.

@tmillr tmillr force-pushed the refactor-colorlib branch 2 times, most recently from f414fb5 to ecb2c9b Compare July 17, 2024 09:05
- Fixup types and doc-comment descriptions. The `Color` module and
  `Color` instances are now well-typed providing LSP completion and
  type-hinting. The `Color` type has been renamed and namspaced under
  `GhTheme.*`. Types provided by the `Color` module are namespaced under
  `GhTheme.Color.*`. The reason for the namespacing is because the Lua
  LSP considers all defined types to be global.

- Remove duplicated code in `__call` and `new()`.

- Throw an error if the argument given to the `Color` constructor is of
  invalid type. Previously there was no error and it just returned
  `nil`.
@tmillr tmillr merged commit 734902f into projekt0n:main Jul 17, 2024
25 checks passed
@tmillr tmillr deleted the refactor-colorlib branch July 17, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant