summaryrefslogtreecommitdiff
path: root/src/@types
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2019-02-01 21:08:49 +0900
committerGitHub <noreply@github.com>2019-02-01 21:08:49 +0900
commit3b30ad5404f458331133e659a04f95e0973d18a8 (patch)
tree4d6ef4e1cade2533ee320a650dbf6b674494fd7c /src/@types
parentUpdate @fortawesome/free-regular-svg-icons requirement (#4076) (diff)
downloadsharkey-3b30ad5404f458331133e659a04f95e0973d18a8.tar.gz
sharkey-3b30ad5404f458331133e659a04f95e0973d18a8.tar.bz2
sharkey-3b30ad5404f458331133e659a04f95e0973d18a8.zip
Create type definition for 'nested-property' (#4004)
* Create type definition for 'nested-property' * Follow lint
Diffstat (limited to 'src/@types')
-rw-r--r--src/@types/nested-property.d.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/@types/nested-property.d.ts b/src/@types/nested-property.d.ts
new file mode 100644
index 0000000000..6990952efd
--- /dev/null
+++ b/src/@types/nested-property.d.ts
@@ -0,0 +1,19 @@
+declare module 'nested-property' {
+ interface IHasNestedPropertyOptions {
+ own?: boolean;
+ }
+
+ interface IIsInNestedPropertyOptions {
+ validPath?: boolean;
+ }
+
+ export function set<T>(object: T, property: string, value: any): T;
+
+ export function get(object: object, property: string): any;
+
+ export function has(object: object, property: string, options?: IHasNestedPropertyOptions): boolean;
+
+ export function hasOwn(object: object, property: string, options?: IHasNestedPropertyOptions): boolean;
+
+ export function isIn(object: object, property: string, objectInPath: object, options?: IIsInNestedPropertyOptions): boolean;
+}