1| Change Type | Old Version | New Version | d.ts File |
2| ---- | ------ | ------ | -------- |
3|Added|NA|Class name: sensor;<br>Method or attribute name: function on(type: SensorId.COLOR, callback: Callback\<ColorResponse>, options?: Options): void;|@ohos.sensor.d.ts|
4|Added|NA|Class name: sensor;<br>Method or attribute name: function on(type: SensorId.SAR, callback: Callback\<SarResponse>, options?: Options): void;|@ohos.sensor.d.ts|
5|Added|NA|Class name: sensor;<br>Method or attribute name: function off(type: SensorId.COLOR, callback?: Callback\<ColorResponse>): void;|@ohos.sensor.d.ts|
6|Added|NA|Class name: sensor;<br>Method or attribute name: function off(type: SensorId.SAR, callback?: Callback\<SarResponse>): void;|@ohos.sensor.d.ts|
7|Added|NA|Class name: SensorId;<br>Method or attribute name: COLOR = 14|@ohos.sensor.d.ts|
8|Added|NA|Class name: SensorId;<br>Method or attribute name: SAR = 15|@ohos.sensor.d.ts|
9|Added|NA|Class name: ColorResponse;<br>Method or attribute name: lightIntensity: number;|@ohos.sensor.d.ts|
10|Added|NA|Class name: ColorResponse;<br>Method or attribute name: colorTemperature: number;|@ohos.sensor.d.ts|
11|Added|NA|Class name: SarResponse;<br>Method or attribute name: absorptionRatio: number;|@ohos.sensor.d.ts|
12|Added|NA|Class name: VibrateFromFile;<br>Method or attribute name: type: 'file';|@ohos.vibrator.d.ts|
13|Added|NA|Class name: VibrateFromFile;<br>Method or attribute name: hapticFd: HapticFileDescriptor;|@ohos.vibrator.d.ts|
14|Added|NA|Class name: HapticFileDescriptor;<br>Method or attribute name: fd: number;|@ohos.vibrator.d.ts|
15|Added|NA|Class name: HapticFileDescriptor;<br>Method or attribute name: offset?: number;|@ohos.vibrator.d.ts|
16|Added|NA|Class name: HapticFileDescriptor;<br>Method or attribute name: length?: number;|@ohos.vibrator.d.ts|
17|Deprecated version changed|Class name: vibrator;<br>Method or attribute name: function vibrate(duration: number): Promise\<void>;<br>Old version information: |Class name: vibrator;<br>Method or attribute name: function vibrate(duration: number): Promise\<void>;<br>New version information: 9<br>Substitute API: vibrator#startVibration|@ohos.vibrator.d.ts|
18|Deprecated version changed|Class name: vibrator;<br>Method or attribute name: function vibrate(effectId: EffectId, callback?: AsyncCallback\<void>): void;<br>Old version information: |Class name: vibrator;<br>Method or attribute name: function vibrate(effectId: EffectId, callback?: AsyncCallback\<void>): void;<br>New version information: 9<br>Substitute API: vibrator#startVibration|@ohos.vibrator.d.ts|
19|Deprecated version changed|Class name: vibrator;<br>Method or attribute name: function stop(stopMode: VibratorStopMode, callback?: AsyncCallback\<void>): void;<br>Old version information: |Class name: vibrator;<br>Method or attribute name: function stop(stopMode: VibratorStopMode, callback?: AsyncCallback\<void>): void;<br>New version information: 9<br>Substitute API: vibrator#stopVibration|@ohos.vibrator.d.ts|
20|Error code changed|Class name: vibrator;<br>Method or attribute name: function startVibration(effect: VibrateEffect, attribute: VibrateAttribute, callback: AsyncCallback\<void>): void;<br>Old version information: 201,401,14600101|Class name: vibrator;<br>Method or attribute name: function startVibration(effect: VibrateEffect, attribute: VibrateAttribute, callback: AsyncCallback\<void>): void;<br>New version information: 201,401,801,14600101|@ohos.vibrator.d.ts|
21|Error code changed|Class name: vibrator;<br>Method or attribute name: function startVibration(effect: VibrateEffect, attribute: VibrateAttribute): Promise\<void>;<br>Old version information: 201,401,14600101|Class name: vibrator;<br>Method or attribute name: function startVibration(effect: VibrateEffect, attribute: VibrateAttribute): Promise\<void>;<br>New version information: 201,401,801,14600101|@ohos.vibrator.d.ts|
22|Permission changed|Class name: vibrator;<br>Method or attribute name: function vibrate(duration: number): Promise\<void>;<br>Old version information: |Class name: vibrator;<br>Method or attribute name: function vibrate(duration: number): Promise\<void>;<br>New version information: ohos.permission.VIBRATE|@ohos.vibrator.d.ts|
23|Permission changed|Class name: vibrator;<br>Method or attribute name: function vibrate(effectId: EffectId, callback?: AsyncCallback\<void>): void;<br>Old version information: |Class name: vibrator;<br>Method or attribute name: function vibrate(effectId: EffectId, callback?: AsyncCallback\<void>): void;<br>New version information: ohos.permission.VIBRATE|@ohos.vibrator.d.ts|
24|Permission changed|Class name: vibrator;<br>Method or attribute name: function stop(stopMode: VibratorStopMode, callback?: AsyncCallback\<void>): void;<br>Old version information: |Class name: vibrator;<br>Method or attribute name: function stop(stopMode: VibratorStopMode, callback?: AsyncCallback\<void>): void;<br>New version information: ohos.permission.VIBRATE|@ohos.vibrator.d.ts|
25|Permission changed|Class name: VibrateOptions;<br>Method or attribute name: mode?: 'long' \| 'short';<br>Old version information: |Class name: VibrateOptions;<br>Method or attribute name: mode?: 'long' \| 'short';<br>New version information: ohos.permission.VIBRATE|@system.vibrator.d.ts|
26|Permission changed|Class name: VibrateOptions;<br>Method or attribute name: success: () => void;<br>Old version information: |Class name: VibrateOptions;<br>Method or attribute name: success: () => void;<br>New version information: ohos.permission.VIBRATE|@system.vibrator.d.ts|
27|Permission changed|Class name: VibrateOptions;<br>Method or attribute name: fail?: (data: string, code: number) => void;<br>Old version information: |Class name: VibrateOptions;<br>Method or attribute name: fail?: (data: string, code: number) => void;<br>New version information: ohos.permission.VIBRATE|@system.vibrator.d.ts|
28|Permission changed|Class name: VibrateOptions;<br>Method or attribute name: complete?: () => void;<br>Old version information: |Class name: VibrateOptions;<br>Method or attribute name: complete?: () => void;<br>New version information: ohos.permission.VIBRATE|@system.vibrator.d.ts|
29|Type changed|Class name: vibrator;<br>Method or attribute name: type VibrateEffect = VibrateTime \| VibratePreset \| VibrateFromFile;<br>Old version information: |Class name: vibrator;<br>Method or attribute name: type VibrateEffect = VibrateTime \| VibratePreset \| VibrateFromFile;<br>New version information: VibrateTime \| VibratePreset \| VibrateFromFile|@ohos.vibrator.d.ts|
30|Function changed|Class name: vibrator;<br>Method or attribute name: type VibrateEffect = VibrateTime \| VibratePreset;|Class name: vibrator;<br>Method or attribute name: type VibrateEffect = VibrateTime \| VibratePreset \| VibrateFromFile;|@ohos.vibrator.d.ts|
31