Skip to content

Latest commit

Β 

History

History
27 lines (24 loc) Β· 1.01 KB

global-plugin.d.ts.md

File metadata and controls

27 lines (24 loc) Β· 1.01 KB
// Type definitions for [~라이브러리 이름~] [~선택적 버전 숫자~]
// Project: [~ν”„λ‘œμ νŠΈ 이름~]
// Definitions by: [~λ‚΄ 이름~] <[~λ‚΄ URL~]>

/*~ μ „μ—­ ν”ŒλŸ¬κ·ΈμΈμ„ μž‘μ„±ν•˜λŠ” 방법을 λ³΄μ—¬μ£ΌλŠ” ν…œν”Œλ¦Ώμž…λ‹ˆλ‹€. */

/*~ 기쑴의 νƒ€μž… 선언을 μž‘μ„±ν•˜κ³ , μƒˆλ‘œμš΄ 멀버λ₯Ό μΆ”κ°€ν•˜μ„Έμš”.
 *~ 예λ₯Ό λ“€μ–΄, μ•„λž˜λŠ” λ‚΄μž₯ 숫자 νƒ€μž…μ— 'toBinaryString' λ©”μ„œλ“œλ₯Ό μΆ”κ°€ν•˜μ—¬
 *~ μ˜€λ²„λΌμ΄λ“œ ν•©λ‹ˆλ‹€.
 */
interface Number {
    toBinaryString(opts?: MyLibrary.BinaryFormatOptions): string;
    toBinaryString(callback: MyLibrary.BinaryFormatCallback, opts?: MyLibrary.BinaryFormatOptions): string;
}

/*~ μ—¬λŸ¬ νƒ€μž…μ„ μ„ μ–Έν•΄μ•Ό ν•œλ‹€λ©΄, μ „μ—­ λ„€μž„μŠ€νŽ˜μ΄μŠ€μ— λ§Žμ€ 것을 μΆ”κ°€ν•˜λŠ” 상황을 ν”Όν•˜κΈ° μœ„ν•΄
 *~ λ„€μž„μŠ€νŽ˜μ΄μŠ€ μ•ˆμ— μœ„μΉ˜μ‹œν‚€μ„Έμš”.
 */
declare namespace MyLibrary {
    type BinaryFormatCallback = (n: number) => string;
    interface BinaryFormatOptions {
        prefix?: string;
        padding: number;
    }
}