Commit Graph

25 Commits

Author SHA1 Message Date
Linden
cc6aed591f chore: adjust links 2025-03-29 21:46:58 +11:00
Linden
fb2225e373 chore: add copyright notices to each file
Some people accidentally, mistakenly, and without any malicious intent forget to attribute code from this resource to its source. This change will hopefully assist people, so that they do not make that mistake again.
2025-03-18 18:46:09 +11:00
Linden
8af94a7194 feat(class): allow private to be redefined
Allows self.private to defined as a new table, allowing it to
remain empty without being removed after instantiation.

Resolves #696.
2025-01-26 04:05:29 +11:00
Linden
e10e8af0de refactor(class): change type returned by lib.class
Return a new type named after the class, rather than OxClass.
We still can't use class generics (i.e. OxClass<`T`>), so classes
still need to be declared (e.g. ---@class Person : OxClass).

Also removed the experimental warning.
2024-07-26 15:23:43 +10:00
Linden
54b7701c36 refactor(class): disable experimental warning for internal modules
This warning is only important for 3rd party users.
2024-06-01 21:45:17 +10:00
Linden
c2efb22e38 refactor(class): mark mixins.new as protected 2024-05-19 15:33:16 +10:00
deFuzz
75f4ecbbea fix(class): fixed private access in method calls (#553)
Co-authored-by: Linden <65407488+thelindat@users.noreply.github.com>
2024-04-28 12:08:15 +10:00
Linden
dcdfe6e442 fix(class): private access in method calls
Maybe there's better ways, but if it works..?
2024-04-18 23:19:09 +10:00
Linden
774da8f755 fix(class): use rawset during instantiation
If classes use a __newindex method it may lead to unexpected behaviour.
2024-04-13 11:15:30 +10:00
Linden
1456f4493e refactor(class): remove support for class.init 2024-03-25 20:48:09 +11:00
Linden
e031f19bea refactor(class): improve types 2024-03-25 20:14:49 +11:00
Linden
356f46d7ef fix(class): only show warning if constructor is undefined 2024-03-13 00:01:17 +11:00
Linden
d105ebe7fe refactor(class): improve types 2024-03-12 19:54:33 +11:00
Linden
8180feaa8c fix(class): disallow calling constructor from objects 2024-03-12 19:54:11 +11:00
Linden
0d1140a54e feat(class): true private fields 2024-03-12 17:37:18 +11:00
Linden
6f4f11ddb5 feat(class): deprecate init in favour of constructor 2024-03-12 16:10:57 +11:00
Linden
3135058310 refactor(class): stricter type-checking 2024-03-12 16:09:28 +11:00
Linden
105d265792 feat(class): add temporary super method during class init 2024-03-11 14:58:54 +11:00
Linden
92dc3688f8 feat(class): recursive instanceOf and isClass method 2024-03-11 11:21:07 +11:00
Linden
de49dff9b0 feat(class): add instanceOf method 2024-03-11 09:06:58 +11:00
Linden
d806668c65 refactor(class): use mixins for default class methods 2024-03-11 09:06:36 +11:00
Linden
1d449d407d chore(class): remove sample code 2023-12-24 16:12:59 +11:00
Linden
dc0720a39e refactor(class): syntax and method changes
Remove .new field when creating a new class.
Remove setMetamethod.
Support super inheritance.
2023-12-19 14:32:36 +11:00
Linden
8a5232c056 refactor(class): type checking 2023-12-18 11:21:28 +11:00
Linden
955acabd3c feat(class): basic class implementation
wip, feedback appreciated.
2023-12-18 00:15:17 +11:00