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

Need not to declare require function for d.ts? #12

Closed
zxj5470 opened this issue Jun 8, 2019 · 5 comments
Closed

Need not to declare require function for d.ts? #12

zxj5470 opened this issue Jun 8, 2019 · 5 comments

Comments

@zxj5470
Copy link

zxj5470 commented Jun 8, 2019

ISSUE

I think we need to add this declaration:

declare function require(path: string): any;

Describe the bug(描述错误)

A clear and concise description of what the bug is.

Expired API(失效的API)

Link(API官方链接)

https://developers.weixin.qq.com/miniprogram/dev/reference/api/require.html

ScreenShot

image

and I add it
image

then
image

@Adherentman
Copy link
Owner

require你可以通过import util from '../../utils/util'实现吗?

@zxj5470
Copy link
Author

zxj5470 commented Jun 12, 2019

require你可以通过import util from '../../utils/util'实现吗?

我只是想表达缺少这个 API,和 import 不 import 没有关系。而且文档中其实是有提及的。唔……签名应该是any require(string path)

https://developers.weixin.qq.com/miniprogram/dev/reference/api/require.html

image

@Adherentman
Copy link
Owner

require你可以通过import util from '../../utils/util'实现吗?

我只是想表达缺少这个 API,和 import 不 import 没有关系。而且文档中其实是有提及的。唔……签名应该是any require(string path)

https://developers.weixin.qq.com/miniprogram/dev/reference/api/require.html

image

ok,今天补上,没注意到这个里文档更新了

@Adherentman
Copy link
Owner

@zxj5470
150266d

@zxj5470
Copy link
Author

zxj5470 commented Jun 13, 2019

emmmm……然后突然发现好像还有一个 Component 和 Behavior 的 API
https://developers.weixin.qq.com/miniprogram/dev/reference/api/Component.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants