You mean you rename export default class Foo ?
-
-
Replying to @wycats @littlecalculist and
Exactly - they dislike that export default class Foo can be imported with a different name, ie import Fooooo from "./foo"
1 reply 0 retweets 0 likes -
Replying to @AdamRackis @littlecalculist and
Feature not a bug. What if I rename foo.js to bar.js and have export class Foo {}?
2 replies 0 retweets 1 like -
Replying to @wycats @littlecalculist and
Yeah I get it guys - as I said the TS community is crazy on this one :)
1 reply 0 retweets 0 likes -
Replying to @AdamRackis @wycats and
Sounds overly fussy given TS only cares about class interfaces rather than class names.
1 reply 0 retweets 4 likes -
-
Replying to @wycats @robpalmer2 and
It's about name consistency (even after rename) in large code base / teams, don't call same thing Buffer in one file and Blob in another
1 reply 0 retweets 1 like -
Replying to @mweststrate @wycats and
There is still the flexibility to give other name; use 'as', which makes it very clear to reader that you are doing this
2 replies 0 retweets 1 like -
Replying to @mweststrate @robpalmer2 and
So let me make sure I'm understanding. The consistency you're looking for is "anywhere I see Blob in a file it means the same thing", but...
1 reply 0 retweets 1 like -
Replying to @wycats @mweststrate and
Since you can use `as` you can't know that *unless you look at the import*. So how is that different from seeing `extend` and seeing ...
2 replies 0 retweets 1 like
import extend from "lodash.assign"? If it's just that you'd like that to be discouraged, lint it away. You probably want to avoid ...
-
-
Replying to @wycats @mweststrate and
export function assign from a file named extend in the named-exports-only style too (if it's the only export).
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.