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

Types definition for Typescript #5

Open
xamoulin opened this issue Sep 11, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@xamoulin
Copy link

commented Sep 11, 2018

That's it!

@liam-betsworth

This comment has been minimized.

Copy link

commented Feb 22, 2019

+1

jeremydaly added a commit that referenced this issue Apr 24, 2019

Merge pull request #23 from deptno/master
#5 add typescript definition
@deptno

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

I've tested with serverless@1.3.0. It seem to work

@shrugs

This comment has been minimized.

Copy link

commented Apr 26, 2019

I'm only able to import with

import create = require('serverless-mysql')

and my intellisense can't seem to import the type ServerlessMysql - is this expected?

@shrugs

This comment has been minimized.

Copy link

commented Apr 26, 2019

Additionally, the Transaction is actually a function returning that interface, not an object, so the existing type of

transaction: Transaction

should be

transaction(): Transaction

and

commit(): Promise<any>

could be

commit(): Promise<any[]>

deptno added a commit to deptno/serverless-mysql that referenced this issue Apr 27, 2019

jeremydaly#5 update definition, export = > export default, transactio…
…n object -> function, commit returns array type
@deptno

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2019

@shrugs > import the type ServerlessMysql - is this expected?

Not expected, definition is very initial version, so many modifications will need more.

Can you review the commit? I applied your comment, deptno@32df25f

@jeremydaly

This comment has been minimized.

Copy link
Owner

commented Apr 27, 2019

Any additional help with TypeScript definitions would be greatly appreciated.

deptno added a commit to deptno/serverless-mysql that referenced this issue Apr 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.