1
在beta11中,我將自己的customTypings.d.ts放在typings文件夾中。
該文件夾在Ionic RC.0中不存在。Ionic 2:在RC.0中註冊自定義類型文件
Q)那麼現在如何在RC.0中註冊我的自定義打字文件呢?
例如, customTypings.d.ts:
interface Window {
plugins: any;
}
declare var SignaturePad: {
new(canvas: any, options?: any): any;
}
interface CordovaPlugins {
OneSignal: any;
}
這對我不起作用。找不到'customTypings.d.ts'。當我嘗試引用它們時,它會查看'src/declarations.d.ts'而不是'customTypings.d.ts'。 – Richard