diff --git a/test/aggregations.spec.ts b/test/aggregations.spec.ts
index d99a9b74..026c38e2 100644
--- a/test/aggregations.spec.ts
+++ b/test/aggregations.spec.ts
@@ -1,4 +1,3 @@
-// tslint:disable
/*
* Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
diff --git a/test/mapping-model/MapAggTest.ts b/test/mapping-model/MapAggTest.ts
index 2ebe611c..1052f3ad 100644
--- a/test/mapping-model/MapAggTest.ts
+++ b/test/mapping-model/MapAggTest.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/MapAggTestOptions.ts b/test/mapping-model/MapAggTestOptions.ts
index eb015ba6..4b3ab13f 100644
--- a/test/mapping-model/MapAggTestOptions.ts
+++ b/test/mapping-model/MapAggTestOptions.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/aggregations/src/agg-array.ts b/test/mapping-model/aggregations/src/agg-array.ts
index a4d74960..ea3085e8 100644
--- a/test/mapping-model/aggregations/src/agg-array.ts
+++ b/test/mapping-model/aggregations/src/agg-array.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/aggregations/src/agg-global-nested.ts b/test/mapping-model/aggregations/src/agg-global-nested.ts
index cadcd879..cc956902 100644
--- a/test/mapping-model/aggregations/src/agg-global-nested.ts
+++ b/test/mapping-model/aggregations/src/agg-global-nested.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/aggregations/src/agg-global.ts b/test/mapping-model/aggregations/src/agg-global.ts
index 7f3f26fa..f09093ef 100644
--- a/test/mapping-model/aggregations/src/agg-global.ts
+++ b/test/mapping-model/aggregations/src/agg-global.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/aggregations/src/agg-inherited-global.ts b/test/mapping-model/aggregations/src/agg-inherited-global.ts
index 65145166..d131ccc9 100644
--- a/test/mapping-model/aggregations/src/agg-inherited-global.ts
+++ b/test/mapping-model/aggregations/src/agg-inherited-global.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/aggregations/src/agg-inherited-overwritten.ts b/test/mapping-model/aggregations/src/agg-inherited-overwritten.ts
index 0512ee40..f103e67f 100644
--- a/test/mapping-model/aggregations/src/agg-inherited-overwritten.ts
+++ b/test/mapping-model/aggregations/src/agg-inherited-overwritten.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/aggregations/src/agg-inherited.ts b/test/mapping-model/aggregations/src/agg-inherited.ts
index 9cd7ef12..2d1a8af7 100644
--- a/test/mapping-model/aggregations/src/agg-inherited.ts
+++ b/test/mapping-model/aggregations/src/agg-inherited.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/aggregations/src/agg-nested.ts b/test/mapping-model/aggregations/src/agg-nested.ts
index 8fb3b100..2b64d6fc 100644
--- a/test/mapping-model/aggregations/src/agg-nested.ts
+++ b/test/mapping-model/aggregations/src/agg-nested.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/aggregations/src/types.ts b/test/mapping-model/aggregations/src/types.ts
index 0978b05a..1582345e 100644
--- a/test/mapping-model/aggregations/src/types.ts
+++ b/test/mapping-model/aggregations/src/types.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/any-unknown.ts b/test/mapping-model/mappings/src/any-unknown.ts
index b740f9b2..6fd86060 100644
--- a/test/mapping-model/mappings/src/any-unknown.ts
+++ b/test/mapping-model/mappings/src/any-unknown.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/default-generics.ts b/test/mapping-model/mappings/src/default-generics.ts
index f571671b..cc84ba4d 100644
--- a/test/mapping-model/mappings/src/default-generics.ts
+++ b/test/mapping-model/mappings/src/default-generics.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/double-type-conflict.ts b/test/mapping-model/mappings/src/double-type-conflict.ts
index e889ca56..cbcdc71e 100644
--- a/test/mapping-model/mappings/src/double-type-conflict.ts
+++ b/test/mapping-model/mappings/src/double-type-conflict.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/enum.ts b/test/mapping-model/mappings/src/enum.ts
index 470e9379..dde5dfa8 100644
--- a/test/mapping-model/mappings/src/enum.ts
+++ b/test/mapping-model/mappings/src/enum.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/filterable-tag.ts b/test/mapping-model/mappings/src/filterable-tag.ts
index 608b1456..7583f27b 100644
--- a/test/mapping-model/mappings/src/filterable-tag.ts
+++ b/test/mapping-model/mappings/src/filterable-tag.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/generics.ts b/test/mapping-model/mappings/src/generics.ts
index 54b127df..7c41cf1c 100644
--- a/test/mapping-model/mappings/src/generics.ts
+++ b/test/mapping-model/mappings/src/generics.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/impossible-union.ts b/test/mapping-model/mappings/src/impossible-union.ts
index 069af3bf..4312207c 100644
--- a/test/mapping-model/mappings/src/impossible-union.ts
+++ b/test/mapping-model/mappings/src/impossible-union.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/incompatible-type.ts b/test/mapping-model/mappings/src/incompatible-type.ts
index 2d119d29..0e57ed5c 100644
--- a/test/mapping-model/mappings/src/incompatible-type.ts
+++ b/test/mapping-model/mappings/src/incompatible-type.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/index-signature.ts b/test/mapping-model/mappings/src/index-signature.ts
index 6a8e9347..a733441e 100644
--- a/test/mapping-model/mappings/src/index-signature.ts
+++ b/test/mapping-model/mappings/src/index-signature.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/inherit-tags.ts b/test/mapping-model/mappings/src/inherit-tags.ts
index 25243ba1..16919dc1 100644
--- a/test/mapping-model/mappings/src/inherit-tags.ts
+++ b/test/mapping-model/mappings/src/inherit-tags.ts
@@ -1,4 +1,3 @@
-// tslint:disable
/*
* Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
diff --git a/test/mapping-model/mappings/src/inherited-property.ts b/test/mapping-model/mappings/src/inherited-property.ts
index 4688d166..a795fbb6 100644
--- a/test/mapping-model/mappings/src/inherited-property.ts
+++ b/test/mapping-model/mappings/src/inherited-property.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/invalid-tag.ts b/test/mapping-model/mappings/src/invalid-tag.ts
index 476bf0db..c7a96909 100644
--- a/test/mapping-model/mappings/src/invalid-tag.ts
+++ b/test/mapping-model/mappings/src/invalid-tag.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/map-explicit-types.ts b/test/mapping-model/mappings/src/map-explicit-types.ts
index 093a454a..92a1468c 100644
--- a/test/mapping-model/mappings/src/map-explicit-types.ts
+++ b/test/mapping-model/mappings/src/map-explicit-types.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/missing-premap.ts b/test/mapping-model/mappings/src/missing-premap.ts
index 967b4d6c..3a06332c 100644
--- a/test/mapping-model/mappings/src/missing-premap.ts
+++ b/test/mapping-model/mappings/src/missing-premap.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/nested.ts b/test/mapping-model/mappings/src/nested.ts
index 3436c9cc..f14afc31 100644
--- a/test/mapping-model/mappings/src/nested.ts
+++ b/test/mapping-model/mappings/src/nested.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/object-union.ts b/test/mapping-model/mappings/src/object-union.ts
index 33865b54..b9703c34 100644
--- a/test/mapping-model/mappings/src/object-union.ts
+++ b/test/mapping-model/mappings/src/object-union.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/paired-tags.ts b/test/mapping-model/mappings/src/paired-tags.ts
index 74100873..1f857ad1 100644
--- a/test/mapping-model/mappings/src/paired-tags.ts
+++ b/test/mapping-model/mappings/src/paired-tags.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/sensible-defaults.ts b/test/mapping-model/mappings/src/sensible-defaults.ts
index 085654d4..deca22f1 100644
--- a/test/mapping-model/mappings/src/sensible-defaults.ts
+++ b/test/mapping-model/mappings/src/sensible-defaults.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/sortable-tag.ts b/test/mapping-model/mappings/src/sortable-tag.ts
index 526f5738..e6458020 100644
--- a/test/mapping-model/mappings/src/sortable-tag.ts
+++ b/test/mapping-model/mappings/src/sortable-tag.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/tags-ignore-case.ts b/test/mapping-model/mappings/src/tags-ignore-case.ts
index e3866601..e53590c5 100644
--- a/test/mapping-model/mappings/src/tags-ignore-case.ts
+++ b/test/mapping-model/mappings/src/tags-ignore-case.ts
@@ -1,3 +1,17 @@
+/*
+ * Copyright (C) 2020 StApps
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see .
+ */
import {ThingType} from './types';
import {MapAggTestOptions} from '../../MapAggTestOptions';
import {ElasticsearchDataType} from '../../../../src/mappings/definitions/typemap';
diff --git a/test/mapping-model/mappings/src/type-alias.ts b/test/mapping-model/mappings/src/type-alias.ts
new file mode 100644
index 00000000..b7fb4842
--- /dev/null
+++ b/test/mapping-model/mappings/src/type-alias.ts
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2020 StApps
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see .
+ */
+
+import {ThingType} from './types';
+import {MapAggTestOptions} from '../../MapAggTestOptions';
+import {ElasticsearchDataType} from '../../../../src/mappings/definitions/typemap';
+
+/**
+ * @indexable
+ */
+export interface TypeAlias {
+ /**
+ *
+ */
+ textProperty: ATextAlias,
+
+ /**
+ *
+ */
+ keywordProperty: AKeywordAlias,
+
+ /**
+ * @keyword
+ */
+ overriddenKeyword: ATextAlias
+
+ type: ThingType.TypeAlias;
+}
+
+/**
+ * @text
+ */
+type ATextAlias = string;
+
+/**
+ * @keyword
+ */
+type AKeywordAlias = string;
+
+export const typeAliasTest: MapAggTestOptions = {
+ name: ThingType.TypeAlias,
+ map: {
+ maps: {
+ textProperty: {
+ type: ElasticsearchDataType.text,
+ },
+ keywordProperty: {
+ type: ElasticsearchDataType.keyword,
+ },
+ overriddenKeyword: {
+ type: ElasticsearchDataType.text,
+ },
+ }
+ }
+};
diff --git a/test/mapping-model/mappings/src/type-query.ts b/test/mapping-model/mappings/src/type-query.ts
index 75edaba7..f3d77621 100644
--- a/test/mapping-model/mappings/src/type-query.ts
+++ b/test/mapping-model/mappings/src/type-query.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/type-wrapper-inheritance.ts b/test/mapping-model/mappings/src/type-wrapper-inheritance.ts
index c8b97b08..d2146dcf 100644
--- a/test/mapping-model/mappings/src/type-wrapper-inheritance.ts
+++ b/test/mapping-model/mappings/src/type-wrapper-inheritance.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
diff --git a/test/mapping-model/mappings/src/types.ts b/test/mapping-model/mappings/src/types.ts
index 7fd20df2..a2f2c98b 100644
--- a/test/mapping-model/mappings/src/types.ts
+++ b/test/mapping-model/mappings/src/types.ts
@@ -1,6 +1,5 @@
-// tslint:disable
/*
- * Copyright (C) 2019 StApps
+ * Copyright (C) 2020 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
@@ -37,4 +36,5 @@ export enum ThingType {
AnyUnknown = 'any unknown',
InheritTags = 'inherit tags',
TagsIgnoreCase = 'tags ignore case',
+ TypeAlias = 'type alias',
}
diff --git a/test/mapping.spec.ts b/test/mapping.spec.ts
index 3ee3df1c..e847ba56 100644
--- a/test/mapping.spec.ts
+++ b/test/mapping.spec.ts
@@ -35,6 +35,7 @@ import {pairedTagsTest} from './mapping-model/mappings/src/paired-tags';
import {filterableTagTest} from './mapping-model/mappings/src/filterable-tag';
import {anyUnknownTest} from './mapping-model/mappings/src/any-unknown';
import {tagsIgnoreCaseTest} from './mapping-model/mappings/src/tags-ignore-case';
+import {typeAliasTest} from './mapping-model/mappings/src/type-alias';
process.on('unhandledRejection', (error: unknown) => {
if (error instanceof Error) {
@@ -108,6 +109,11 @@ export class MappingSpec {
magAppInstance.testInterfaceAgainstPath(typeQueryTest);
}*/
+ @test
+ async 'Type alias annotations should work'(){
+ magAppInstance.testInterfaceAgainstPath(typeAliasTest);
+ }
+
@test
async 'Impossible union should cause an error'() {
magAppInstance.testInterfaceAgainstPath(impossibleUnionTest);