no-deprecated-deno-api
NOTE: this rule is part of the
推荐 rule set.Enable full set in
deno.json:{
"lint": {
"rules": {
"tags": ["推荐"]
}
}
}Enable full set using the Deno CLI:
deno lint --rules-tags=推荐
This rule can be explictly included to or excluded from the rules present in the current tag by adding it to the
include or exclude array in deno.json:{
"lint": {
"rules": {
"include": ["no-deprecated-deno-api"],
"exclude": ["no-deprecated-deno-api"]
}
}
}警告使用已弃用的 - Deno APIs。
以下 API 将从 Deno.* 命名空间中移除,但有更新的 API 可以迁移。请参阅
Deno 1.x 到 2.x 迁移指南
以获取迁移说明。
Deno.BufferDeno.CloserDeno.close()Deno.Conn.ridDeno.copy()Deno.customInspectDeno.FileDeno.fstatSync()Deno.fstat()Deno.FsWatcher.ridDeno.ftruncateSync()Deno.ftruncate()Deno.futimeSync()Deno.futime()Deno.isatty()Deno.Listener.ridDeno.ListenTlsOptions.certFileDeno.ListenTlsOptions.keyFileDeno.readAllSync()Deno.readAll()Deno.ReaderDeno.ReaderSyncDeno.readSync()Deno.read()Deno.run()Deno.seekSync()Deno.seek()Deno.serveHttp()Deno.ServerDeno.shutdownDeno.stderr.ridDeno.stdin.ridDeno.stdout.ridDeno.TlsConn.ridDeno.UnixConn.ridDeno.writeAllSync()Deno.writeAll()Deno.WriterDeno.WriterSyncDeno.writeSync()Deno.write()new Deno.FsFile()
以下 API 将从 Deno.* 命名空间中移除且没有替代方案。
Deno.resources()Deno.metrics()