npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cabin-icarus/y3-lua-types

v0.2.1

Published

y3-lua的typescript的类型文件

Downloads

3

Readme

代码主要由工具生成, 目前我对y3还不熟悉,暂时不会手动维护,如果可以,你可以PR

目前因为工具那边注释生成还未解决完成,暂时不支持注解生成=-=,后续如果解决了,在更新

TS的开发模板,模板中附带的测试代码

已知问题:

  1. 因为工具在转换时一些信息丢失了,我无法知道方法是静态还是成员的,导致一些静态方法调用时转换为lua会出问题
  • 如: y3.unit.create_unit

v0.1.4 更新

  1. y3.game.event进行了处理,现在会扫描event.luaeventconfig.lua 生成ts的声明文件,获得更好的智能提示,效果如下, 感谢@西索酱的PR给我的提示

Z{_NQD%@QP71}$7 YPW@33 FK9Q NT)GB{H}BAVUVSMSGL

手动扩展方式需要写2个必须定义和1个可选定义:

  1. GameEventDeclarations 接口,写事件的定义
    • 结构为: 事件名 : 事件回调参数类型 | GameEventCallbackParamsDeclarations["name]
  1. GameEventParamsDeclarations 接口, 写事件的参数定义
    • 结构的固定格式: 事件名 : (...事件参数列表, act:Action1<Trigger, GameEventDeclarations['事件名']>)->void;
  1. [可选]GameEventCallbackParamsDeclarations 接口, 写事件的回调参数定义,就是事件触发后的action中的参数
    • 结构为: 名字 : 类型定义