Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-468461: Wrong jQuery $(this) resolution

$
0
0
Reporter Albert Weinert (der-albert.com) Albert Weinert (der-albert.com)
Created Feb 20, 2018 5:24:41 PM
Updated Apr 17, 2018 12:31:06 PM
Subsystem TypeScript
Assignee Nikita Popov (poksh)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 2018.1, 2017.3.1
Fixed In Version ReSharper Undefined
VsVersion VS 2017 RTM
`
import 'jquery';

export function initializeLayoutSwitch(selector: string) {

const checkboxes = $(selector) as JQuery<HTMLInputElement>;


checkboxes.each(function () {
$(this).change(function () {
const checked = $(this).prop('checked');
});
});
}
`
This first $(this) is been marked as an error.




@types/jquery 3.3.0 is used and TypeScript 2.6.2

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>