-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Upgrade to TS 2.1 #492
Upgrade to TS 2.1 #492
Conversation
also fix some linting issues
though it still doesn't support `extends` 😭 ivogabe/gulp-typescript#459
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the "extends" thing is really unfortunate... I've started using it in other projects and am a big fan
@@ -50,17 +50,6 @@ export function clamp(val: number, min: number, max: number) { | |||
return Math.min(Math.max(val, min), max); | |||
} | |||
|
|||
/** Return a new object with the same keys as the given object (values are copied, not cloned). */ | |||
export function shallowClone<T>(object: T): T { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
@@ -40,51 +40,52 @@ import { | |||
Utils, | |||
} from "../src/index"; | |||
|
|||
// tslint:disable:max-classes-per-file no-console jsx-no-lambda jsx-no-multiline-js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to disable jsx-no-multiline-js? would prefer to keep it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same but would prefer not to touch this file too much. most of what you see here was done automatically by TSLint or VSCode formatting.
isColumnResizable: false, | ||
isRowResizable: false, | ||
selectionModes: SelectionModes.NONE, | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this indentation change looks wrong, the previous alignment is preferred
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, i didn't look closely at the formatting. maybe i'll just revert, it's not super relevant.
], | ||
}, | ||
], | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
what do you plan to do with tslib and Partial? |
avail myself of them :) marking this WIP for now. hence the unchecked tasks. |
FWIW, i'm able to use so it really only affects |
- add `tslib` dependency - test tsconfigs can safely extend package root tsconfigs because tests are only run from webpack (never gulp-typescript)
@themadcreator @gscshoyru Table code coverage is failing the build. seems like a test for column resizing would fix it swimmingly. might one of you be able to take that one this week? |
ideal for components that have required props!
@giladgray why would coverage change as a result of this PR? Those things should really be decoupled; please don't add a test in this PR. |
i'm not planning to add a test in this PR and I'm not sure exactly why coverage changed. you'll notice it's extremely close to the threshold (79%, must be 80% to pass) so all it would have taken is one little tweak to drop coverage below the threshold. my guess is that switching to |
ready 4 review 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall, looks good, but:
this reduces the size of each source file at the cost of one additional NPM dependency
sorry, performance enhancements shouldn't be merged without measurements. what is the impact of this for the end user? are they actually saving on bundle size?
nvm, I read the 2.1 release notes, this looks legit |
Fixes #376, Fixes #11
Checklist
tslib
Partial
for props in some test suitesextends
outside of gulp-typescript 😭 Support for configuration inheritance ivogabe/gulp-typescript#459Changes proposed in this pull request:
Object.assign
andUtils.shallowClone
with object spreadstslib
for--importHelpers
flagPartial<Props>
in test suites for components that have required props!extends
in tsconfig.json files that are never built withgulp-typescript