CI: Test type definitions
Also, fix a typo in the typings.
This commit is contained in:
parent
e1fc91958c
commit
eb496d2018
21
.github/workflows/test-type-definitions.yml
vendored
Normal file
21
.github/workflows/test-type-definitions.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: Types
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Test type definitions
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '15'
|
||||
- run: npm ci
|
||||
- run: npm run test-type-definitions
|
2
openpgp.d.ts
vendored
2
openpgp.d.ts
vendored
|
@ -147,7 +147,7 @@ export function readMessage<T extends MaybeStream<string>>(options: { armoredMes
|
|||
export function readMessage<T extends MaybeStream<Uint8Array>>(options: { binaryMessage: T, config?: PartialConfig }): Promise<Message<T>>;
|
||||
|
||||
export function createMessage<T extends MaybeStream<string>>(options: { text: T, filename?: string, date?: Date, type?: DataPacketType }): Message<T>;
|
||||
export function createMessage<T extends MaybeStream<Uint8Array>>(options: { bytes: T, filename?: string, date?: Date, type?: DataPacketType }): Message<T>;
|
||||
export function createMessage<T extends MaybeStream<Uint8Array>>(options: { binary: T, filename?: string, date?: Date, type?: DataPacketType }): Message<T>;
|
||||
|
||||
export function encrypt<T extends MaybeStream<Data>>(options: EncryptOptions & { message: Message<T>, armor: false }): Promise<
|
||||
T extends WebStream<infer X> ? WebStream<Uint8Array> :
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* - if it fails to run, edit this file to match the actual library API, then edit the definitions file (openpgp.d.ts) accordingly.
|
||||
*/
|
||||
|
||||
import { generateKey, readKey, readKeys, Key, readMessage, createMessage, createCleartextMessage, encrypt, decrypt, sign, verify, config } from '../..';
|
||||
import { generateKey, readKey, readKeys, Key, readMessage, createMessage, Message, createCleartextMessage, encrypt, decrypt, sign, verify, config } from '../..';
|
||||
|
||||
import { expect } from 'chai';
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user