mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
20 lines
465 B
TypeScript
20 lines
465 B
TypeScript
import { DynamicDNS, Service } from 'google-ddns';
|
|
|
|
const ddns = new DynamicDNS({
|
|
hostname: 'subdomain.example.com',
|
|
username: 'foo',
|
|
password: 'bar',
|
|
});
|
|
|
|
ddns.sync(); // $ExpectType Promise<true | SuccessResponse>
|
|
ddns.getCurrentIP(); // $ExpectType Promise<string>
|
|
ddns.getPublicIP(); // $ExpectType Promise<string>
|
|
|
|
const service = new Service({
|
|
hostname: 'subdomain.example.com',
|
|
username: 'foo',
|
|
password: 'bar',
|
|
});
|
|
|
|
service.start();
|