-
Notifications
You must be signed in to change notification settings - Fork 141
Experimental PR to test switching from .js to .ts #346
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
Conversation
Hey Doguhan, since I've never used Typescript before I will probably make pretty slow work of a lot of these errors. Do you want to try to take a pass at these and raise any question marks here? |
@kgroat if you're interested in helping out, this is the PR for transitioning in to |
Hey friends, what's the status update of this branch? |
@kgroat resolved all typescript errors. But now the unit tests are failing
because they are not being transpiled with tsc. So very close to completion.
On Sat, Mar 31, 2018 at 8:31 AM Justin Searls ***@***.***> wrote:
Hey friends, what's the status update of this branch?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#346 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAyLj1Wb0Ah9ot-8hRpFafnbJPVEZNX5ks5tj3cMgaJpZM4SSr4a>
.
--
Best,
Doguhan Uluca
540-257-5143
|
Setting allowJs project-wide will conflict with the `declaration` option which is why I imagine it was turned off
Working on getting this up to date and tests passing.
Right now the only failing test is the Here's what {
quibble: [test double for "quibble: quibble"],
function: [test double for "../../src/function: .default"],
func: [test double for "../../src/function: .default"],
object: [test double for "../../src/object: .default"],
constructor: [test double for "../../src/constructor: .default"],
imitate: [test double for "../../src/imitate: .default"],
when: [test double for "../../src/when: .default"],
verify: [test double for "../../src/verify: .default"],
matchers: {
create: [test double for "../../src/matchers: .default.create"],
captor: [test double for "../../src/matchers: .default.captor"],
isA: [test double for "../../src/matchers: .default.isA"],
anything: [test double for "../../src/matchers: .default.anything"],
contains: [test double for "../../src/matchers: .default.contains"],
argThat: [test double for "../../src/matchers: .default.argThat"],
not: [test double for "../../src/matchers: .default.not"]
},
Captor: undefined,
Created: undefined,
replace: [test double for "../../src/replace: .default"],
explain: [test double for "../../src/explain: .default"],
reset: [test double for "../../src/reset: .default"],
config: [test double for "../../src/config: .default"],
ConfigObject: undefined,
callback: callback,
version: "3.7.0"
} |
1. import & export quibble (I can't figure out how to one-liner this) 2. Remove the three names that are exported as undefined because I can't figure out what to do with them. Hopefully someone in testdouble#346 can educate me!
Okay, all done for now. Forced the |
@searls this command is giving me a headache |
@duluca it looks like this is probably the way to go with standard (I agree this configuration is not good). Here's a github comment with 7 or 8 repos configured to use it: bradzacher/eslint-plugin-typescript#110 (comment) |
Closing as stale (though I'd still be interested in moving testdouble.js to typescript, enough has changed in the tooling that we'd probably want to start fresh) |
I was thinking about this just the other day and what a missed opportunity
it was not to push it through at the time. I’ll give the repo another look.
I’m itching for a challenge :)
On Thu, Jul 14, 2022 at 8:50 AM Justin Searls ***@***.***> wrote:
Closing as stale (though I'd still be interested in moving testdouble.js
to typescript, enough has changed in the tooling that we'd probably want to
start fresh)
—
Reply to this email directly, view it on GitHub
<#346 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGIXD7SJJ4BSJXU2OAFAIDVUAEJNANCNFSM4ESKXYNA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Doguhan Uluca
|
Bring it on, @duluca! Incidentally, I tried porting Mocktail to Sorbet but it looks like Sorbet's type system is not capable of generic return types being coded as instances that match a class/module argument type (e.g. |
Goal, remove Browserify as a dependency with a browser targeted tsconfig.json file.
To get there, must switch over to .ts.
Lot's of errors, because TypeScript isn't liking the existing imports and module.exports.
Errors received after switching