diff --git a/types/jquery.pjax/index.d.ts b/types/jquery.pjax/index.d.ts index ebb713236e..a8437533c5 100644 --- a/types/jquery.pjax/index.d.ts +++ b/types/jquery.pjax/index.d.ts @@ -2,9 +2,6 @@ // Project: https://github.com/defunkt/jquery-pjax // Definitions by: Junle Li // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// /** * Interface for pjax:popstate event. @@ -33,7 +30,7 @@ interface PjaxSettings extends JQueryAjaxSettings { * Whether to replaceState the URL. Defaults to false. */ replace?: boolean; - + /** * How many requests to cache. Defaults to 20. */ diff --git a/types/jquery.pjax/jquery.pjax-tests.ts b/types/jquery.pjax/jquery.pjax-tests.ts index 91cc9391a2..205a1d3cf9 100644 --- a/types/jquery.pjax/jquery.pjax-tests.ts +++ b/types/jquery.pjax/jquery.pjax-tests.ts @@ -1,3 +1,5 @@ +import * as jQuery from 'jquery'; + function test_fn_pjax() { $(document).pjax("a"); $(document).pjax("a", "#pjax-container"); @@ -66,4 +68,4 @@ function test_events() { console.log('pjax:popstate is OK'); } }); -} \ No newline at end of file +} diff --git a/types/jquery.pjax/tsconfig.json b/types/jquery.pjax/tsconfig.json index e48007101b..0cd3f55757 100644 --- a/types/jquery.pjax/tsconfig.json +++ b/types/jquery.pjax/tsconfig.json @@ -12,6 +12,11 @@ "typeRoots": [ "../" ], + "paths": { + "jquery": [ + "jquery/v2" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -20,4 +25,4 @@ "index.d.ts", "jquery.pjax-tests.ts" ] -} \ No newline at end of file +}