Skip to content

Commit 6ec467b

Browse files
committed
fix: correct DataSet method return type declarations
1 parent 141fbff commit 6ec467b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

index.d.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -37,62 +37,62 @@ declare module 'dicom-parser' {
3737
/**
3838
* Finds the element for tag and returns an unsigned int 16 if it exists and has data. Use this function for VR type US.
3939
*/
40-
uint16: (tag: string, index?: number) => number;
40+
uint16: (tag: string, index?: number) => number | undefined;
4141

4242
/**
4343
* Finds the element for tag and returns a signed int 16 if it exists and has data. Use this function for VR type SS.
4444
*/
45-
int16: (tag: string, index?: number) => number;
45+
int16: (tag: string, index?: number) => number | undefined;
4646

4747
/**
4848
* Finds the element for tag and returns an unsigned int 32 if it exists and has data. Use this function for VR type UL.
4949
*/
50-
uint32: (tag: string, index?: number) => number;
50+
uint32: (tag: string, index?: number) => number | undefined;
5151

5252
/**
5353
* Finds the element for tag and returns a signed int 32 if it exists and has data. Use this function for VR type SL.
5454
*/
55-
int32: (tag: string, index?: number) => number;
55+
int32: (tag: string, index?: number) => number | undefined;
5656

5757
/**
5858
* Finds the element for tag and returns a 32 bit floating point number if it exists and has data. Use this function for VR type FL.
5959
*/
60-
float: (tag: string, index?: number) => number;
60+
float: (tag: string, index?: number) => number | undefined;
6161

6262
/**
6363
* Finds the element for tag and returns a 64 bit floating point number if it exists and has data. Use this function for VR type FD.
6464
*/
65-
double: (tag: string, index?: number) => number;
65+
double: (tag: string, index?: number) => number | undefined;
6666

6767
/**
6868
* Returns the actual Value Multiplicity of an element - the number of values in a multi-valued element.
6969
*/
70-
numStringValues: (tag: string) => number;
70+
numStringValues: (tag: string) => number | undefined;
7171

7272
/**
7373
* Finds the element for tag and returns a string if it exists and has data. Use this function for VR types AE, CS, SH, and LO.
7474
*/
75-
string: (tag: string, index?: number) => string;
75+
string: (tag: string, index?: number) => string | undefined;
7676

7777
/**
7878
* Finds the element for tag and returns a string with the leading spaces preserved and trailing spaces removed if it exists and has data. Use this function for VR types UT, ST, and LT.
7979
*/
80-
text: (tag: string, index?: number) => string;
80+
text: (tag: string, index?: number) => string | undefined;
8181

8282
/**
8383
* Finds the element for tag and parses a string to a float if it exists and has data. Use this function for VR type DS.
8484
*/
85-
floatString: (tag: string, index?: number) => number;
85+
floatString: (tag: string, index?: number) => number | undefined;
8686

8787
/**
8888
* Finds the element for tag and parses a string to an integer if it exists and has data. Use this function for VR type IS.
8989
*/
90-
intString: (tag: string, index?: number) => number;
90+
intString: (tag: string, index?: number) => number | undefined;
9191

9292
/**
9393
* Finds the element for tag and parses an element tag according to the 'AT' VR definition if it exists and has data. Use this function for VR type AT.
9494
*/
95-
attributeTag: (tag: string) => string;
95+
attributeTag: (tag: string) => string | undefined;
9696
}
9797

9898
export interface ByteStream {

0 commit comments

Comments
 (0)