/
validate.yml
94 lines (94 loc) · 3.76 KB
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
### YamlMime:TSType
name: Validate
uid: '@microsoft/sp-core-library!Validate:class'
package: '@microsoft/sp-core-library!'
fullName: Validate
summary: Performs common validation tests for properties and function parameters.
remarks: >-
This class implements provides a standard way to validate properties and function parameters. Unlike debug assertions,
Validate checks are always performed and will always throw an error, even in a production release. As such, be careful
not to overuse these checks in a way that might impact performance.
isPreview: false
isDeprecated: false
type: class
methods:
- name: 'isNonemptyString(value, variableName)'
uid: '@microsoft/sp-core-library!Validate.isNonemptyString:member(1)'
package: '@microsoft/sp-core-library!'
fullName: 'isNonemptyString(value, variableName)'
summary: 'Throws an exception if the specified string is null, undefined, or an empty string.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'static isNonemptyString(value: string | undefined | null, variableName: string): void;'
parameters:
- id: value
description: the value to check
type: string | undefined | null
- id: variableName
description: 'the program variable name, which will be mentioned in the error message'
type: string
return:
type: void
description: ''
- name: 'isNotDisposed(value, className)'
uid: '@microsoft/sp-core-library!Validate.isNotDisposed:member(1)'
package: '@microsoft/sp-core-library!'
fullName: 'isNotDisposed(value, className)'
summary: Throws an exception if the specified object has been disposed.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'static isNotDisposed(value: IDisposable, className: string): void;'
parameters:
- id: value
description: the value to check
type: '<xref uid="@microsoft/sp-core-library!IDisposable:interface" />'
- id: className
description: 'the class name, which will be mentioned in the error message'
type: string
return:
type: void
description: ''
- name: 'isNotNullOrUndefined(value, variableName)'
uid: '@microsoft/sp-core-library!Validate.isNotNullOrUndefined:member(1)'
package: '@microsoft/sp-core-library!'
fullName: 'isNotNullOrUndefined(value, variableName)'
summary: Throws an exception if the specified value is null or undefined.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'static isNotNullOrUndefined(value: unknown, variableName: string): void;'
parameters:
- id: value
description: the value to check
type: unknown
- id: variableName
description: 'the program variable name, which will be mentioned in the error message'
type: string
return:
type: void
description: ''
- name: 'isTrue(value, variableName)'
uid: '@microsoft/sp-core-library!Validate.isTrue:member(1)'
package: '@microsoft/sp-core-library!'
fullName: 'isTrue(value, variableName)'
summary: Throws an exception if the specified value is not true.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'static isTrue(value: boolean | undefined | null, variableName: string): void;'
parameters:
- id: value
description: the value to check
type: boolean | undefined | null
- id: variableName
description: 'the program variable name, which will be mentioned in the error message'
type: string
return:
type: void
description: ''