Conversation
for instantiation █▀▄▀█ ▄▀█ █▀▄ █▀▀ █▀ █▀█ █▀▄▀█ █▀▀ █▀▄▀█ ▄▀█ █▀▀ █ █▀▀ █░▀░█ █▀█ █▄▀ ██▄ ▄█ █▄█ █░▀░█ ██▄ █░▀░█ █▀█ █▄█ █ █▄▄ ALSO DOENST WORKS yet
LET THE HAIL BEGIN
into the huge composit type it turns out the bot class have a very different enumerate function from teh general ai enumerate function, which caused discrepancies in the types also sidenote, NonNullable is the type time equivalent of !. type operator, so there are som forced type casts which may lead to unexpected result. I don't really care about that right now, as this part is hopefully not critical now
Fuck my life. Also TODO: fix this to be more sensible. Also TODO: figure out why it doesn't works This reverts commit 17a1218.
|
I am afraid to check the code. How is it doing? You haven't marked it draft before. Is the code ready for merge? Nit: Also, instead of revert, you might find fixup, autosquash and force pushing rhe feature branch a better candidate. but also great use of commot msg conventions |
src/common/botwrapper.ts
Outdated
| //this actually results in a somewhat correct type, altough it doesn't implements some of the private methods, for some reason ts doesn't complains about that | ||
| class _Bot extends Bot { | ||
| // waits 400 ms for UX | ||
| // waits 400 ms for UX, and is a private type |
There was a problem hiding this comment.
i do not understand this comment. You wanted to add this to the class header maybe?
Also, I think wait coul be marked private
There was a problem hiding this comment.
yes, it should be.
This comment was more like to keep track of what's going on.
|
I'm still working on it, because it doesn't solves all the issues. |
|
Feel free to merge partial results.
I think they are not the same thing: export A, export B, export default C if you import * from koa, A, B, C will be available in the global scope: C.c(); If you import * from koa as Koa, the Koa object will contain properties A, B, C. Koa.C.c(); I think. However, if you import Koa, you will have a single object, which is C. Koa.c();... I think... |
by which I mean: If you have a partial result, which works, and it is not hacky, then it should be merged, I think. So that the branch always contains the best version of the code, in quality, typing, etc. If it is too hacky, it might be best to improve it before merging. The npm ci should be the one that works: if the CI job works, it should not be a problem to replicate a successful build. |
You are right, but inside the Koa type definition they have a big umbrella export calss, and internally everything is collected into one namespace. There is only one export inside Koa or Koa-routing as matter of fact, so it has now difference in this case. It is porbably not the best way to do it like this, but i'm not sure if I'll make the pull request for this. |
It's kinda hacky right now, but i'm starting to figure stuff out. It will be significantly better soon, and the main parts will be ok-ish especially from type support point of game development, which is the main concern really. |
fix related parts
bc git is not cooperative
add some documentations
In the name of strongly typed languages, and thus a better development experience, I set out to improve the type safety of the project. This is in fact probably impossible, and the scope should be better defined, but....
This far, there are significant desing decisions, which makes typing really hard, and require some convoluted type magic. This is also maybe considered by some as a fun activity. Also maybe helps with the
<G:any,ctx:any, Promise<any,any>> extends anyand similar situations which may lead to missing fileds, or broken usages of objects.⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡏⠠⢉⠒⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡊⠉⠒⠲⠤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠉⣹⢸⢳⡈⢢⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⠈⣏⠲⡀⢷⡀⠀⠀⠀⠀⠀⣀⠜⢁⡾⠀⢹⡌⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⢷⠸⡆⠹⣄⢳⡀⢀⠤⠒⣋⡤⠖⠋⠀⠀⡼⢃⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢸⡁⠈⠑⢄⡀⠀⢀⠼⢁⡗⠀⢸⡄⣷⠉⡴⠋⠁⠀⠀⠀⢠⠞⣠⡞⠙⢆⠀⠀⠀⠀⢀⣤⢤⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠙⣆⢰⣄⢳⡼⢁⡴⠋⠀⠀⢸⡇⠛⣸⠁⠀⠀⠀⠀⠀⡏⣴⣿⠇⣰⡄⢳⡀⠀⢀⠾⢠⢀⡧⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢀⣤⠤⣄⡀⠀⣠⠏⡸⢹⡎⠁⡾⠀⠀⠀⠀⠸⢬⠷⠽⠀⣠⠀⠀⠀⠀⠻⡀⡤⣰⠃⠹⢤⣉⡟⢁⡴⣿⠉⣍⠳⡀⠀⠀⠀⠀⠀
⠀⠀⠈⢷⡀⢀⠸⠾⢁⡼⠁⠸⡇⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠰⠋⠀⠀⠀⠀⠀⠈⠉⠁⠀⠀⢸⠃⢠⡏⠀⢿⣀⣿⢦⠘⡆⠀⠀⠀⠀
⠀⠀⠀⠀⣳⠄⣷⢠⡎⠀⠀⠀⠙⢦⣷⠀⢸⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢧⣀⣷⠀⠀⠈⠁⢨⡇⣽⠀⠀⠀⠀
⠀⠀⠀⢠⠇⣼⢹⣸⡇⠀⠀⠀⠀⠀⠀⢠⡇⠀⠀⠀⠀⠀⠀⣀⣠⣤⣀⠀⢀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠸⠀⠀⣠⣶⣉⣴⣿⣷⣀⣀⣤
⠀⢿⣷⣾⣶⣷⣿⣏⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⢠⡾⠉⣷⣆⡬⢷⡋⣿⠧⠉⢳⡄⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣍
⢶⣿⣿⣿⣿⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣾⣇⠀⠈⣾⠀⠀⢹⡆⠀⠀⢀⣿⣤⡀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⠛⠛
⠀⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⡀⢀⣼⣿⣷⣾⣿⣿⣿⣿⣷⣀⡀⢀⣼⣿⣿⣿⣿⣿⡏⠈⠲⠀
⠈⠛⢻⡙⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⢴⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣾⣿⣿⣿⣿⣿⡿⠃⠀⢀⠀
⠀⠀⡼⠧⡈⠻⣿⣿⣿⣿⣿⣷⣄⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠒⠀⢀⡼⠃
⢀⣠⡇⢠⣌⣡⠼⠻⣿⣿⣿⣿⣿⣧⡀⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⢩⠄⡏
⠸⡄⢧⣄⡙⢦⡀⠀⠘⠻⣿⣿⣿⣿⣿⣷⣦⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⠀⠀⠀⢀⣀⡤⠞⣰⠏
⠀⠳⡈⠳⣌⠉⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⣼⠀⠶⡾⠁⠀
⠀⠀⠈⠢⣌⣳⡄⠀⠀⢢⡀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠙⢲⡆⡇⠀⠀
⠀⠀⠀⠀⠊⡹⠃⠀⠀⠀⠃⠀⠀⠀⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⣠⠤⠚⢉⡤⠃⠀⠀