1
0
Fork 0

added "Encoding" type

This commit is contained in:
Anatoly 2019-04-12 17:35:02 +03:00
parent d798c10b01
commit 0c509d3ace
2 changed files with 23 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import * as path from 'path';
import { EventEmitter } from 'events';
import { Pool as MySQLPool } from 'mysql';
import { Pool as PgPool } from 'pg';
import { Encoding } from './Encoding';
export default class Conversion {
/**
@ -57,7 +58,7 @@ export default class Conversion {
/**
* JavaScript encoding type.
*/
public readonly _encoding: string;
public readonly _encoding: Encoding;
/**
* The path to the "all.log" file.

21
src/Encoding.ts Normal file
View File

@ -0,0 +1,21 @@
/*
* This file is a part of "NMIG" - the database migration tool.
*
* Copyright (C) 2016 - present, Anatoly Khaytovich <anatolyuss@gmail.com>
*
* 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; either version 3 of the License.
*
* 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 (please see the "LICENSE.md" file).
* If not; see <http=//www.gnu.org/licenses/gpl.txt>.
*
* @author Anatoly Khaytovich <anatolyuss@gmail.com>
*/
export type Encoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'latin1' | 'binary' | 'hex';