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

Added rwlock typings #332

Merged
merged 5 commits into from
Apr 18, 2016
Merged

Added rwlock typings #332

merged 5 commits into from
Apr 18, 2016

Conversation

CaselIT
Copy link
Contributor

@CaselIT CaselIT commented Apr 18, 2016

Filling in these fields will make it easier for us to review:

Typings URL: [E.g. https://github.com/CaselIT/typings-rwlock]
Source URL: [E.g. https://github.com/71104/rwlock]

Thanks for contributing!

@unional
Copy link
Member

unional commented Apr 18, 2016

https://github.com/71104/rwlock/blob/master/package.json#L18
Seems like the main is lock, may be better to name your typings as lock.d.ts

@unional
Copy link
Member

unional commented Apr 18, 2016

Pure styling: since it is namespaced in ReatWriteLock already, you probably don't need to name the interfaces as RW* https://github.com/CaselIT/typings-rwlock/blob/master/rwlock.d.ts#L13

@CaselIT
Copy link
Contributor Author

CaselIT commented Apr 18, 2016

Even if the import is with rwlock?
Regarding the RW I'll remove them.

@unional
Copy link
Member

unional commented Apr 18, 2016

Even if the import is with rwlock

The general convention would be following what's in the package.json/main for "require-ability" in case there are multiple files. Doesn't really matter in this case. 😄

@blakeembrey, I asked about this a while ago:

This case is clear:

// in source:
// package.json/main = "a.js" or "a"
// folder:
a.js
lib/b.js

// in typings:
// typings.json/main = "a.d.ts"

Would like to confirm on this:

// in source:
// package.json/main = "lib/a.js" or "lib/a"
// folder:
lib/a.js
lib/b.js

// in typings:
// typings.json/main = "a.d.ts" or "lib/a.d.ts"?

@CaselIT
Copy link
Contributor Author

CaselIT commented Apr 18, 2016

I'll also rename the file then 👍
Should I also put it under lib?

@unional
Copy link
Member

unional commented Apr 18, 2016

I think you don't have to. You can change that in the future if needed. Will not do any harm since it is the main.

@CaselIT
Copy link
Contributor Author

CaselIT commented Apr 18, 2016

Committed the changes 👍

@unional unional merged commit 8c8bf19 into typings:master Apr 18, 2016
@blakeembrey
Copy link
Member

FWIW, you won't be able to access ReadWriteGeneric outside of the module. Hope that's ok.

@unional Let's stay true to the source. If anything, that's the source of truth and there needs to be no extra questions.

@CaselIT
Copy link
Contributor Author

CaselIT commented Apr 18, 2016

ReadWriteGeneric is only used to avoid code repetition so there is no need to access it outside the module. That's why I defined it outside the namespace.

@unional
Copy link
Member

unional commented Apr 18, 2016

@unional Let's stay true to the source.

So meaning save it as lib/a.d.ts. 😄

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

Successfully merging this pull request may close these issues.

3 participants