File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @tls/enum" ,
3- "version" : " 0.5.0 " ,
3+ "version" : " 0.5.1 " ,
44 "exports" : " ./src/mod.ts" ,
55 "publish" : {
66 "exclude" : [" dist/" ]
Original file line number Diff line number Diff line change @@ -134,4 +134,15 @@ export class Handshake extends Uint8Array {
134134 }
135135}
136136
137+ export class EndOfEarlyData extends Uint8Array {
138+ static fromHandshake ( array ) {
139+ const type = HandshakeType . fromValue ( array . at ( 0 ) ) ;
140+ if ( type !== HandshakeType . END_OF_EARLY_DATA ) return TypeError ( `Expected ${ HandshakeType . END_OF_EARLY_DATA . name } ` )
141+ return new EndOfEarlyData
142+ }
143+ constructor ( ) {
144+ super ( )
145+ }
146+ }
147+
137148// npx -p typescript tsc ./src/handshaketype.js --declaration --allowJs --emitDeclarationOnly --lib ESNext --outDir ./dist
You can’t perform that action at this time.
0 commit comments