From b11c5e098a5004225df32cf57c9300206c911b71 Mon Sep 17 00:00:00 2001 From: Lucas Riondel Date: Thu, 22 Feb 2018 17:26:50 +0100 Subject: [PATCH] added base64topdf definition file --- types/base64topdf/base64topdf-tests.ts | 8 ++++++++ types/base64topdf/index.d.ts | 13 +++++++++++++ types/base64topdf/tsconfig.json | 23 +++++++++++++++++++++++ types/base64topdf/tslint.json | 1 + 4 files changed, 45 insertions(+) create mode 100644 types/base64topdf/base64topdf-tests.ts create mode 100644 types/base64topdf/index.d.ts create mode 100644 types/base64topdf/tsconfig.json create mode 100644 types/base64topdf/tslint.json diff --git a/types/base64topdf/base64topdf-tests.ts b/types/base64topdf/base64topdf-tests.ts new file mode 100644 index 0000000000..109ec5fbff --- /dev/null +++ b/types/base64topdf/base64topdf-tests.ts @@ -0,0 +1,8 @@ +import * as base64topdf from 'base64topdf'; + +base64topdf.base64Encode('index.ts'); // $ExpectType void +base64topdf.base64Decode('decodethis', 'test.b64'); // $ExpectType void +base64topdf.rtfToText('rtf'); // $ExpectType string +base64topdf.textToRtf('text'); // $ExpectType string +base64topdf.strToBase64('str'); // $ExpectType string +base64topdf.base64ToStr('base64'); // $ExpectType string diff --git a/types/base64topdf/index.d.ts b/types/base64topdf/index.d.ts new file mode 100644 index 0000000000..97f9af7077 --- /dev/null +++ b/types/base64topdf/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for base64topdf 1.1 +// Project: https://github.com/rpsankar001 +// Definitions by: Lucas Riondel +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace base64topdf; + +export function base64Encode(file: string): void; +export function base64Decode(base64str: string, file: string): void; +export function rtfToText(rtfStr: string): string; +export function textToRtf(textStr: string): string; +export function strToBase64(str: string): string; +export function base64ToStr(base64Str: string): string; diff --git a/types/base64topdf/tsconfig.json b/types/base64topdf/tsconfig.json new file mode 100644 index 0000000000..29fb459eb9 --- /dev/null +++ b/types/base64topdf/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "base64topdf-tests.ts" + ] +} diff --git a/types/base64topdf/tslint.json b/types/base64topdf/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/base64topdf/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }