Skip to content

Commit 8d45842

Browse files
gr2mamcasey
authored andcommitted
Add types for atob-lite and btoa-lite (DefinitelyTyped#35983)
* Add types for atob-lite * Add types for btoa-lite
1 parent bd0e234 commit 8d45842

File tree

8 files changed

+58
-0
lines changed

8 files changed

+58
-0
lines changed

types/atob-lite/atob-lite-tests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import atob = require('atob-lite');
2+
3+
atob('PDM=');

types/atob-lite/index.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Type definitions for atob-lite 2.0
2+
// Project: https://github.com/hughsk/atob-lite
3+
// Definitions by: Gregor Martynus <https://github.com/gr2m>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
6+
type DecodedData = string;
7+
declare function atob(encodedData: string): DecodedData;
8+
9+
export = atob;

types/atob-lite/tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"lib": ["es6"],
5+
"noImplicitAny": true,
6+
"noImplicitThis": true,
7+
"strictNullChecks": true,
8+
"strictFunctionTypes": true,
9+
"baseUrl": "../",
10+
"typeRoots": ["../"],
11+
"types": [],
12+
"noEmit": true,
13+
"forceConsistentCasingInFileNames": true
14+
},
15+
"files": ["index.d.ts", "atob-lite-tests.ts"]
16+
}

types/atob-lite/tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "extends": "dtslint/dt.json" }

types/btoa-lite/btoa-lite-tests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import btoa = require('btoa-lite');
2+
3+
btoa('<3');

types/btoa-lite/index.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Type definitions for btoa-lite 1.0
2+
// Project: https://github.com/hughsk/btoa-lite
3+
// Definitions by: Gregor Martynus <https://github.com/gr2m>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
6+
type EncodedData = string;
7+
declare function btoa(decodedData: string): EncodedData;
8+
9+
export = btoa;

types/btoa-lite/tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"lib": ["es6"],
5+
"noImplicitAny": true,
6+
"noImplicitThis": true,
7+
"strictNullChecks": true,
8+
"strictFunctionTypes": true,
9+
"baseUrl": "../",
10+
"typeRoots": ["../"],
11+
"types": [],
12+
"noEmit": true,
13+
"forceConsistentCasingInFileNames": true
14+
},
15+
"files": ["index.d.ts", "btoa-lite-tests.ts"]
16+
}

types/btoa-lite/tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "extends": "dtslint/dt.json" }

0 commit comments

Comments
 (0)