Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Sound controls

CardSoundWindowtype

The parts of a window the sounds use: an audio context and atob. Any of them may be missing.

Import it

import type { CardSoundWindow } from "@johnmorrisdotca/toranpu/card-sounds";

Definition

type CardSoundWindow = {
    AudioContext?: typeof AudioContext;
    webkitAudioContext?: typeof AudioContext;
    atob?: (text: string) => string;
};

Members

NameTypeDescription
AudioContext (optional){ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; } | undefined
webkitAudioContext (optional){ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; } | undefined
atob (optional)((text: string) => string) | undefined

Examples

import type { CardSoundWindow } from "@johnmorrisdotca/toranpu/card-sounds";

const value: CardSoundWindow = {};
console.log(value.AudioContext === undefined);
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.