mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
28 lines
462 B
TypeScript
28 lines
462 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @target: es5
|
|
// @outDir: ./out
|
|
// @declaration: true
|
|
// @filename: interface.ts
|
|
export interface Encoder<T> {
|
|
encode(value: T): Uint8Array
|
|
}
|
|
// @filename: lib.js
|
|
/**
|
|
* @template T
|
|
* @implements {IEncoder<T>}
|
|
*/
|
|
export class Encoder {
|
|
/**
|
|
* @param {T} value
|
|
*/
|
|
encode(value) {
|
|
return new Uint8Array(0)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* @template T
|
|
* @typedef {import('./interface').Encoder<T>} IEncoder
|
|
*/ |