Skip to content

Commit 2d39468

Browse files
committed
Add namespace Typescript definition
1 parent 87d2d36 commit 2d39468

3 files changed

Lines changed: 72 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2021 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
// TypeScript Version: 2.0
20+
21+
/* tslint:disable:max-line-length */
22+
/* tslint:disable:max-file-line-count */
23+
/* tslint:disable:completed-docs */
24+
25+
import Proxy = require( '@stdlib/proxy/ctor' );
26+
27+
/**
28+
* Interface describing the `proxy` namespace.
29+
*/
30+
interface Namespace {
31+
Proxy: typeof Proxy;
32+
}
33+
34+
/**
35+
* Proxy.
36+
*/
37+
declare var ns: Namespace;
38+
39+
40+
// EXPORTS //
41+
42+
export = ns;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2021 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
/* tslint:disable:no-unused-expression */
20+
21+
import proxy = require( './index' );
22+
23+
24+
// TESTS //
25+
26+
// The exported value is the expected interface...
27+
{
28+
proxy; // $ExpectType Namespace
29+
}

lib/node_modules/@stdlib/proxy/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"lib": "./lib",
2020
"test": "./test"
2121
},
22+
"types": "./docs/types",
2223
"scripts": {},
2324
"homepage": "https://github.com/stdlib-js/stdlib",
2425
"repository": {

0 commit comments

Comments
 (0)