refactor(TypeScript): Add noImplicitAny
We automatically insert explicit 'any's where needed. These need to be addressed as in #9100. Fixes #4924
This commit is contained in:
@ -23,7 +23,7 @@ export function main() {
|
||||
beforeEach(() => { recognizer = new RuleSet(); });
|
||||
|
||||
|
||||
it('should recognize a static segment', inject([AsyncTestCompleter], (async) => {
|
||||
it('should recognize a static segment', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
recognizer.config(new Route({path: '/test', component: DummyCmpA}));
|
||||
recognize(recognizer, '/test')
|
||||
.then((solutions: RouteMatch[]) => {
|
||||
@ -34,7 +34,7 @@ export function main() {
|
||||
}));
|
||||
|
||||
|
||||
it('should recognize a single slash', inject([AsyncTestCompleter], (async) => {
|
||||
it('should recognize a single slash', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
recognizer.config(new Route({path: '/', component: DummyCmpA}));
|
||||
recognize(recognizer, '/')
|
||||
.then((solutions: RouteMatch[]) => {
|
||||
@ -45,7 +45,7 @@ export function main() {
|
||||
}));
|
||||
|
||||
|
||||
it('should recognize a dynamic segment', inject([AsyncTestCompleter], (async) => {
|
||||
it('should recognize a dynamic segment', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
recognizer.config(new Route({path: '/user/:name', component: DummyCmpA}));
|
||||
recognize(recognizer, '/user/brian')
|
||||
.then((solutions: RouteMatch[]) => {
|
||||
@ -57,7 +57,7 @@ export function main() {
|
||||
}));
|
||||
|
||||
|
||||
it('should recognize a star segment', inject([AsyncTestCompleter], (async) => {
|
||||
it('should recognize a star segment', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
recognizer.config(new Route({path: '/first/*rest', component: DummyCmpA}));
|
||||
recognize(recognizer, '/first/second/third')
|
||||
.then((solutions: RouteMatch[]) => {
|
||||
@ -68,8 +68,8 @@ export function main() {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should recognize a regex', inject([AsyncTestCompleter], (async) => {
|
||||
function emptySerializer(params): GeneratedUrl { return new GeneratedUrl('', {}); }
|
||||
it('should recognize a regex', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
function emptySerializer(params: any /** TODO #9100 */): GeneratedUrl { return new GeneratedUrl('', {}); }
|
||||
|
||||
recognizer.config(
|
||||
new Route({regex: '^(.+)/(.+)$', serializer: emptySerializer, component: DummyCmpA}));
|
||||
@ -83,8 +83,8 @@ export function main() {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should recognize a regex with named_groups', inject([AsyncTestCompleter], (async) => {
|
||||
function emptySerializer(params): GeneratedUrl { return new GeneratedUrl('', {}); }
|
||||
it('should recognize a regex with named_groups', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
function emptySerializer(params: any /** TODO #9100 */): GeneratedUrl { return new GeneratedUrl('', {}); }
|
||||
|
||||
recognizer.config(new Route({
|
||||
regex: '^(.+)/(.+)$',
|
||||
@ -125,7 +125,7 @@ export function main() {
|
||||
});
|
||||
|
||||
|
||||
it('should recognize redirects', inject([AsyncTestCompleter], (async) => {
|
||||
it('should recognize redirects', inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
recognizer.config(new Route({path: '/b', component: DummyCmpA}));
|
||||
recognizer.config(new Redirect({path: '/a', redirectTo: ['B']}));
|
||||
recognize(recognizer, '/a')
|
||||
@ -155,7 +155,7 @@ export function main() {
|
||||
|
||||
|
||||
it('should generate using a serializer', () => {
|
||||
function simpleSerializer(params): GeneratedUrl {
|
||||
function simpleSerializer(params: any /** TODO #9100 */): GeneratedUrl {
|
||||
var extra = {c: params['c']};
|
||||
return new GeneratedUrl(`/${params['a']}/${params['b']}`, extra);
|
||||
}
|
||||
@ -190,7 +190,7 @@ export function main() {
|
||||
|
||||
describe('params', () => {
|
||||
it('should recognize parameters within the URL path',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
recognizer.config(
|
||||
new Route({path: 'profile/:name', component: DummyCmpA, name: 'User'}));
|
||||
recognize(recognizer, '/profile/matsko?comments=all')
|
||||
@ -216,7 +216,7 @@ export function main() {
|
||||
|
||||
|
||||
it('should prefer positional params over query params',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
recognizer.config(
|
||||
new Route({path: 'profile/:name', component: DummyCmpA, name: 'User'}));
|
||||
recognize(recognizer, '/profile/yegor?name=igor')
|
||||
@ -229,7 +229,7 @@ export function main() {
|
||||
|
||||
|
||||
it('should ignore matrix params for the top-level component',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
recognizer.config(
|
||||
new Route({path: '/home/:subject', component: DummyCmpA, name: 'User'}));
|
||||
recognize(recognizer, '/home;sort=asc/zero;one=1?two=2')
|
||||
|
Reference in New Issue
Block a user