refactor: apply stricter ts-lint rules

This commit is contained in:
Michel Jonathan Schmitz
2019-07-15 13:14:20 +02:00
parent fee004c79f
commit 355da9e8c4
7 changed files with 23 additions and 17 deletions

View File

@@ -12,14 +12,14 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {ConnectorClient} from '@openstapps/api/lib/connectorClient';
import {HttpClient} from '@openstapps/api/lib/httpClient';
import {ConnectorClient} from '@openstapps/api/lib/connector-client';
import {HttpClient} from '@openstapps/api/lib/http-client';
import {
SCLicensePlate,
SCNamespaces,
SCThings,
} from '@openstapps/core';
import {Connector} from './Connector';
import {Connector} from './connector';
/**
* Checks if the input is a valid SCNamespace
@@ -27,7 +27,8 @@ import {Connector} from './Connector';
* @param input Name of the potential SCNamespace
*/
export function isValidSCNamespace(input: string): input is SCLicensePlate {
return Object.keys(SCNamespaces).indexOf(input) > 0;
return Object.keys(SCNamespaces)
.indexOf(input) > 0;
}
/**
@@ -38,7 +39,7 @@ export function isValidSCNamespace(input: string): input is SCLicensePlate {
* @param itemIdentifier Identifying representation of the item
* @param licensePlate License plate of the school
*/
export function createUUID(itemIdentifier: any, licensePlate: SCLicensePlate): string {
export function createUUID(itemIdentifier: unknown, licensePlate: SCLicensePlate): string {
return ConnectorClient.makeUUID(JSON.stringify(itemIdentifier), licensePlate);
}